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)

I was expecting my IDE (VsCode) to consider processing as boolean|null.

But not sure why, VsCode considers it as only boolean 🤔
image.png
Was this page helpful?