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
I regularly find it annoying that there is no way to type something as "anything, except None".
In Kotlin the root type Any is split from null, and the union of those is denoted Any?
In TypeScript the root type unknown includes null and undefined, but those types are distinct from the other basal types object, number etc. {} can be used to refer to any type except null(and undefined)
I think a Not type would be overkill, but a handcrafted type that represents anything except None would based and useful.
The text was updated successfully, but these errors were encountered:
#801 already suggests a general Not type. I agree that either a general Not type or a specialized NotNone type would occasionally be useful, but all discussions about new typing features should go to typing-sig.
I regularly find it annoying that there is no way to type something as "anything, except None".
In Kotlin the root type
Any
is split fromnull
, and the union of those is denotedAny?
In TypeScript the root type
unknown
includesnull
andundefined
, but those types are distinct from the other basal typesobject
,number
etc.{}
can be used to refer to any type exceptnull
(andundefined
)I think a
Not
type would be overkill, but a handcrafted type that represents anything except None would based and useful.The text was updated successfully, but these errors were encountered: