title: Checking validity of string literal union type at runtime?
body: <p>I have a simple union type of string literals and need to check it's validity because of FFI calls to "normal" Javascript. Is there a way to ensure that a certain variable is an instance of any of those literal strings <strong>at runtime</strong>? Something along the lines of</p>
  
  <pre><code>type MyStrings = "A" | "B" | "C";
  MyStrings.isAssignable("A"); // true
  MyStrings.isAssignable("D"); // false
  </code></pre>