/** * Make an interface nullable */ export declare type Nullable = { [P in keyof GType]: GType[P] | null; }; /** * Remove keys from an interface */ export declare type Omit = Pick>; /** * Give keys the type never */ export declare type Never = Omit & Partial>; /** * Makes specified keys of an interface Optional. */ export declare type MakeOptional = Omit & { [P in GKeys]+?: GType[P]; }; /** * Makes specified keys of an interface nullable. */ export declare type MakeNullable = Omit & { [P in GKeys]: GType[P] | null; }; /** * Makes specified keys of an interface Required. */ export declare type MakeRequired = Omit & { [P in GKeys]-?: GType[P]; }; /** * Makes specified keys of an interface readonly. */ export declare type MakeReadonly = Omit & { +readonly [P in GKeys]: GType[P]; }; /** * Get all property names from an interface which are functions. */ export declare type FunctionPropertyNames = { [K in keyof T]: T[K] extends AnyFunction ? K : never; }[keyof T]; /** * Pick an interface composed entirely of the function properties. */ export declare type FunctionProperties = Pick>; /** * Get all property names from an interface which are not functions. */ export declare type NonFunctionPropertyNames = { [K in keyof T]: T[K] extends AnyFunction ? never : K; }[keyof T]; /** * Pick an interface composed entirely of the non function properties. */ export declare type NonFunctionProperties = Pick>; /** * Pick the values from a type */ export declare type ValueOf = GType[keyof GType]; /** * Alias of @see ValueOf */ export declare type Value = ValueOf; export declare type Key = keyof GType; /** * Removes all types from a union that don't extend from the extender type */ export declare type Include = GType extends GExtender ? GType : never; export declare type ValueOfStringArray = Include], string>; /** * A union of all the type primitives (including the empty object) */ export declare type Literal = string | number | boolean | undefined | null | void | {}; /** * Pick the Nth Param for any function with the first parameter marked by the 0 index. */ export declare type NthParam = GFunction extends (...args: infer GArgs) => any ? GArgs[GIndex] : never; /** * Use this to create a Tuple with args that can be used as a type * * @example * ``` * const ALL_SUITS = tuple('hearts', 'diamonds', 'spades', 'clubs'); * type SuitTuple = typeof ALL_SUITS; * type Suit = SuitTuple[number]; // union type * ``` * @param args */ export declare const tuple: (...args: GType) => GType; /** * A useful helper for conditional types */ export declare type FilterFlags = { [P in keyof GBase]: GBase[P] extends GCondition ? P : never; }; export declare type AnyFunction = (...args: any[]) => any; /** * Useful for removing the empty interface `{}` from a list of types */ export declare type NonEmptyInterface = keyof GType extends never ? never : GType; export declare type AnyKey = string | number | symbol; //# sourceMappingURL=types.d.ts.map