/** * For instances where we'd like to define a Tuple to be of certain type and length. * Example: TupleOf // [number, number, number] * * For more example and use cases regarding Recursive conditional types * see: https://github.com/microsoft/TypeScript/pull/40002 * * @internal */ type _TupleOf = R["length"] extends N ? R : _TupleOf; export type TupleOf = N extends N ? (number extends N ? T[] : _TupleOf) : never; /** * Converts snake_case string literal types to camelCase. * * @internal */ export type SnakeToCamelCase = S extends `${infer T}_${infer U}` ? `${T}${Capitalize>}` : S; /** * Converts camelCase string literal types to snake_case. * * @internal */ export type CamelToSnakeCase = S extends `${infer T}${infer U}` ? `${T extends Capitalize ? "_" : ""}${Lowercase}${CamelToSnakeCase}` : S; /** * Maps an enum (usually defined in proto) to a record with publicly facing keys as camelCase string literals. * The keys of the resulting record are the camelCased versions of the original enum keys, * and the values are the corresponding enum values. * * @template T - The enum type to be transformed. * * @internal */ export type EnumToPublicStringLiteralMap = { [K in keyof T as SnakeToCamelCase>]: T[K]; }; export type ExcludeKeys = Omit; export {}; //# sourceMappingURL=types.d.ts.map