While updating the various .d.ts to have | null and | undefined, I came across some typings that use any but don't allow null or undefined.
I think there is value in being able to express both "This can be any type including null and undefined" and "This can be any type excluding null / undefined", but there is no way to express the latter.
While updating the various .d.ts to have
| nulland| undefined, I came across some typings that useanybut don't allownullorundefined.Object.defineProperty:
oand the returned value cannot benullorundefined.Object.setPrototypeOf:
oand the returned value cannot benullorundefined.protocan benullbut notundefined.etc.
I think there is value in being able to express both "This can be any type including null and undefined" and "This can be any type excluding null / undefined", but there is no way to express the latter.