[TypeScript] correct way to tell typescript a property does exist?
I have the following function;
Is there a proper way to inform typescript that inside of that if block, by definition, that property very much does exist? or is this a case where TS is painfully blind to reality?
4 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
yup that'd be it...
apparently I was using 4.7 and forgot to add
^
to the version in package.json, thanks!Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
this is just a toy project, I'm kinda expecting it to break often anyway. I tend to only use the basics of TS as well so hopefully they won't fundamentally change the language any time soon