2022-07-23 00:39:23 +00:00
|
|
|
declare type MapToType = {
|
2022-09-08 20:48:31 +00:00
|
|
|
boolean: boolean;
|
2022-07-23 00:39:23 +00:00
|
|
|
number: number;
|
2022-09-08 20:49:59 +00:00
|
|
|
object: Record<string, unknown>;
|
2022-07-23 00:39:23 +00:00
|
|
|
string: string;
|
2022-07-27 20:18:51 +00:00
|
|
|
undefined: undefined;
|
2022-07-23 00:39:23 +00:00
|
|
|
};
|
2022-07-26 23:05:18 +00:00
|
|
|
|
2022-11-26 01:38:01 +00:00
|
|
|
type ReducedMapToType = Pick<MapToType, 'boolean' | 'number' | 'string'>;
|
|
|
|
|
2022-07-26 23:05:18 +00:00
|
|
|
declare type MapToValueConverter = {
|
2022-11-26 01:38:01 +00:00
|
|
|
[TypeName in keyof ReducedMapToType]: (
|
|
|
|
value: unknown,
|
|
|
|
) => ReducedMapToType[TypeName];
|
2022-07-26 23:05:18 +00:00
|
|
|
};
|