String to Array: [ 'hello' ] Number to Array: [ 42 ] Filtering strings from union: [ 'hello', 'world' ] In TypeScript, the type "StringOrNumberArray" would be: string[] | number[] In TypeScript, the type "StringsOnly" would be: string | "hello"