Skip to main content
seanmcp.com

Note #38


Today I learned about TypeScript’s non-null assertion operator: !. It’s a nice way to let the TS compiler know that the value cannot be null or undefined, which is a pretty common use case in my experience. This StackOverflow question and answer helped unpack things for me, and you can reference the documentation here. ❗️