I have just installed Deno 1.9.2 and opened up a blank folder on my PC. I am following a tutorial on the basics of TypeScript. This is where my problem is.
const someFunc = (n: number) => {
if (n % 2 === 0) {
return "even"
}
}
const value = someFunc(4)
value.substring(1)
At one point VSCode gives the teacher an inline warning on value saying Object is possibly 'undefined'. I've looked around and was told to change my VSCode typescript.validate.enable to true. I've done this and I've restarted VSCode multiple times. When I run my code with deno run index.ts, I get my error. Any ideas?