You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the current pr works for a homogeneous list with or without defaults.
Defining array with multiple types in TypeScript
Use a union type (string|number)[] demo:
If list contains only two elements [number, string] we can declare it as a tuple:
const foo: [number, string] = [ 1, "message" ];
we can also support union and tuple?(maybe not) in the following stage.
This currently panics:
Instead, it should generate an interface with a
number[]
field and a default const with[1,2]
The text was updated successfully, but these errors were encountered: