In the following code, I would expect the destructured array variables, firstName and lastName, to be of type string | undefined because the array being destructured could have fewer variables than the number being declared, in which case the additional declared variables will be undefined. However, typescript considers them to be type string. Why is that? Thanks
const [firstName, lastName] = fullName.split(' ')
// Typescript produces these types:
// const firstName: string
// const lastName: string
noUncheckedIndexedAccesscompiler option and have all the fun in the world asserting things with!everywhere.