title: How to specify an array of characters in TypeScript
body: <p>I need to pass this array into my function using Typescript:</p>
  
  <pre><code>  const message = [ 'c', 'a', 'k', 'e', ' ',
                  'p', 'o', 'u', 'n', 'd', ' ',
                  's', 't', 'e', 'a', 'l' ];
  
  </code></pre>
  
  <p>As TypeScript doesn't have a type for a fixed length character, I'm not sure what is the best way to pass in the array to my function.</p>
  
  <p>Right now I'm calling it like this but I want to do it in a better way</p>
  
  <pre><code>function reverseWords(wordArray :any[]): any[]{
  
  }
  </code></pre>
  
  <p>I also tried using generics to make sure the input and output were the same but got the error
  "Type 'string' is not assignable to type 'T'"</p>
  
  <pre><code>function reverseWords&lt;T&gt;(wordArray: Array&lt;T&gt;): Array&lt;T&gt; {
    return ["c", "a", "k", "e"];
  }
  
  </code></pre>
  
  <p>Thanks so much for any guidance on this, I'm clearly new to Type Script.</p>