type ArrayIndices <T extends readonly any[]> = Exclude<keyof T, keyof any[]>;
let array = ["hello","word"] as const;
type ArrayIndexUnited = ArrayIndices<typeof array>; // typeof array: 获取array值的类型
// ArrayIndexUnited("0"|"1")
type ArrayIndices <T extends readonly any[]> = Exclude<keyof T, keyof any[]>;
let array = ["hello","word"] as const;
type ArrayIndexUnited = ArrayIndices<typeof array>; // typeof array: 获取array值的类型
// ArrayIndexUnited("0"|"1")