plasmo
plasmo copied to clipboard
[BUG] Unexpected typescript behaviour
What happened?
Hi 👋, I noticed a a weird behaviour while using typescript. Basically with the below code:
const foo: string | null = null
I was expecting that vscode would treat foo
as string
or null
But, it just treats as string
Not sure, why this is happening.
Initially I thought something wrong with my config.
Then, I did a fresh install of the with-nextjs
example.
Same with that as well.
Version
Latest
What OS are you seeing the problem on?
Windows
What browsers are you seeing the problem on?
No response
Relevant log output
No response
(OPTIONAL) Contribution
- [ ] I would like to fix this BUG via a PR
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
- [X] I checked the current issues for duplicate problems.
You need to add "strictNullChecks": true,
in your tsconfig.json