anvil/striker-ui/types/MapToType.d.ts

16 lines
358 B
TypeScript
Raw Normal View History

declare type MapToType = {
2022-09-08 20:48:31 +00:00
boolean: boolean;
number: number;
object: Record<string, unknown>;
string: string;
undefined: undefined;
};
type ReducedMapToType = Pick<MapToType, 'boolean' | 'number' | 'string'>;
declare type MapToValueConverter = {
[TypeName in keyof ReducedMapToType]: (
value: unknown,
) => ReducedMapToType[TypeName];
};