UNPKG

ts-type

Version:

add some typescript type and re-export some build-in typescript type

9 lines (8 loc) 271 B
/** * get keys of tuple * * @example * ITSTupleKeys<[string, string, string]> = "0" | "1" | "2" * @see https://stackoverflow.com/questions/50374908/transform-union-type-to-intersection-type */ export type ITSTupleKeys<T extends any[]> = Exclude<keyof T, keyof []>;