Fun TypeScript fact: you can pass null! to any function.

! is the non-nullable assertion, and null is null - so together they make 'never'.

And 'never' can be passed to anything!

Source: x.com/mattpocockuk/status/1831614750926541093

Reply to this note

Please Login to reply.

Discussion

No replies yet.