title: How can I make an empty string array in Typescript?
body: <p>I would like to have an array that holds string error messages. Here's the code that I came up with:</p>
  
  <pre><code>var errors: [string];
  errors = [];
  Object.keys(response.data.modelState).forEach(function (key) {
      errors.push.apply(errors, response.data.modelState[key]);
  });
  </code></pre>
  
  <p>I tried some different ways to add a typescript definition to the variable errors but none seem to work for this case. The first definition works okay but then when I am pushing values I need to push to an array and when I set:</p>
  
  <pre><code>errors = []; 
  </code></pre>
  
  <p>Then it gives me an error message:</p>
  
  <blockquote>
    <p>Severity  Code    Description Project File    Line Error  TS2322  Type
    'undefined[]' is not assignable to type '[string]'.   Property '0' is
    missing in type 'undefined[]'.
    Severity  Code    Description Project File    Line Error      Build: Type
    'undefined[]' is not assignable to type '[string]'.</p>
  </blockquote>