/** * Extract the properties which are functions. */ export declare type PickFunctions = { [K in keyof T]: T[K] extends (...args: any[]) => any ? T[K] : never; }; /** * Convert a type containing functions to the same type with return types instead of functions. */ export declare type ReturnTypes = { [P in keyof T]: T[P] extends (...args: any[]) => infer R ? R : T[P]; }; /** * Transform all properties into string. */ export declare type Stringized = { [P in keyof T]: string; }; /** * Add the ability to set all properties as undefined. */ export declare type Undefinedable = { [P in keyof T]: T[P] | undefined; }; /** * Remove the readonly from the type properties. */ export declare type Unlocked = { -readonly [P in keyof T]: T[P]; }; /** * Remove the readonly from the arrays. */ export declare type UnlockedArray = { [P in keyof T]: T[P] extends ReadonlyArray ? U[] : T[P]; }; /** * An unassembled from of the messages (template function and parameters are stored appart). The purpose of * such message is for when a client should display a message with parameters given by the server. It must * be the client's responsability to build the strings because the user could ask for a language change. */ export declare type UnassembledMessages = { [K in keyof T]: T[K] extends (...args: infer P) => any ? { template: K; parameters: P; } : K; }; /** * The keys of pure messages of the language type. Pure messages are the ones not taking parameters. Note * that even if it is legal to define a pure message as a function taking no parameter instead of a string, * such defined messages will not be considered pure. Note that this is compatible with an * `UnassembledMessages[K]`. */ export declare type PureMessageKey = { [K in keyof T]: T[K] extends string ? K : never; }[keyof T];