#also in ts do i have to make sure to

1 messages · Page 1 of 1 (latest)

dreamy vigil
ruby girderBOT
#

Hi @dreamy vigil. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

dreamy vigil
#

You have to check, and TS will yell at you if you haven't.

ruby girderBOT
#

Sorry @dreamy vigil, I seem to be having a bit of trouble. Don't worry though, I've pinged my supprt and they will try to fix me up! :technologist:

Perhaps try again in 15mins?

craggy vigil
dreamy vigil
#

Your type needs to be honest about whether something can be undefined or null - if your type implies something will always have a value, typescript will trust it. If your type has | null or | undefined or has some optional properties, typescript will remember and tell you

craggy vigil