Given a list of string literals and/or string subtype arrays, creates a typed, flattened array.
For example:
const x = makeStringSubtypeArray('one', 'two');type X = typeof x[0];const y = makeStringSubtypeArray(x, 'three');type Y = typeof y[0]; Copy
const x = makeStringSubtypeArray('one', 'two');type X = typeof x[0];const y = makeStringSubtypeArray(x, 'three');type Y = typeof y[0];
In the above example:
x
Array<'one' | 'two'>
y
Array<'one' | 'two' | 'three'>
and so:
'one' | 'two'
'one' | 'two' | 'three'
Given a list of string literals and/or string subtype arrays, creates a typed, flattened array.
For example:
In the above example:
x
isArray<'one' | 'two'>
y
isArray<'one' | 'two' | 'three'>
and so:
'one' | 'two'
'one' | 'two' | 'three'