Skip to content

Should index access for array be `| undefined`?

Actual

type matrix = PathToType<string[][], "[1][2]"> // type matrix = string

Expected (?)

type matrix = PathToType<string[][], "[1][2]"> // type matrix = string | undefined