Typescript unions not working

Hi, I'm facing a weird issue with Typescript, I have created a state like this:
const [processing, setProcessing] = useState<boolean | null>(false)
const [processing, setProcessing] = useState<boolean | null>(false)
I was expecting my IDE (VsCode) to consider processing as boolean|null. But not sure why, VsCode considers it as only boolean 🤔
No description
1 Reply
Arcane
Arcane•15mo ago
@Aniket has reached level 1. GG!
Want results from more Discord servers?
Add your server