For example: https://www.typescriptlang.org/docs/handbook/type-compatibil...
https://www.typescriptlang.org/docs/handbook/type-compatibil...
Or the type of an array and its elements:
const arr : number[] = [1]
const this_is_actually_undefined : number = arr[456]
const correct_type : number | undefined = arr[idx]
Thanks so much!
For example: https://www.typescriptlang.org/docs/handbook/type-compatibil...
https://www.typescriptlang.org/docs/handbook/type-compatibil...
Or the type of an array and its elements:
but so it should be And there are way more, I'm too lazy to search for them or think about them.