nathanoy
Explore posts from serversTTCTheo's Typesafe Cult
•Created by nathanoy on 5/6/2024 in #questions
Array.pop() cant be undefined after if check, but typescript doenst know.
Hi, i have this snipped in my code:
x is of type
Entry[]
And pop returns Entry | undefined
My question is: How can i tell typescript that it can not be the undefined branch?6 replies