collectype / types/utility / ArrayKeys
ArrayKeys<
T> ={ [K in keyof T]: T[K] extends any[] ? K : never }[keyofT]
Defined in: types/utility.ts:144
Returns the union of keys in T whose value type is an array (any[]), including optional properties.
T
The object type to inspect.
type A = { foo: string[]; bar?: number[]; baz: string };
type Keys = ArrayKeys<A>; // "foo" | "bar"