type Test = { [key: string]: any; }
type Test = { a: string } type NewTest = Test["a"] // string
type Test = ["test", "test2"] type NewTest = Test[number] // "test" | "test2"