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
As per #24897, outside of JSDoc the ? modifier is only valid for tuple elements, not arbitrary types. It does not make sense to say that a type can be omitted, only that an element can be omitted.
The above definition is inside a tuple, and one way to look at that is the element can be omitted or not.
But I guess that messes up in other ways like making sure all the other elements are optional too.
TypeScript Version: 4.1.0-dev.20200807
Search Terms: conditional type tuple
Code
Expected behavior:
Expected the definition to work as expected.
Actual behavior:
Got the following error:
Playground Link: Playground Link
Related Issues: Did not find anything close.
The text was updated successfully, but these errors were encountered: