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.
Activity
jack-williams commentedon Aug 15, 2020
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.ienzam commentedon Aug 18, 2020
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-bot commentedon Sep 5, 2020
This issue has been marked 'Working as Intended' and has seen no recent activity. It has been automatically closed for house-keeping purposes.