title: how to specify type of array element in typescript?
body: <p>I have this code:</p>
  <pre><code>enum MyValues  {
      FIRST = &quot;firstValue&quot;,
      SECOND = &quot;secondValue&quot;,
  };
  
  type myObjectType = {
      myKey: string;
      myValue: MyValues;
  }
  
  const tags: string = &quot;someKey:firstValue&quot;;
  
  const parseTags = (tags: string): myObjectType =&gt; {
      const [myKey, myValue] = tags.split(&quot;:&quot;);  /// ???
      return {
          myKey,
          myValue, ///???
      }
  };
  
  console.log(parseTags(tags))
  </code></pre>
  <p>How to specify, that first array element is string, but second one is enum (MyValues)?</p>