feat(type utils): add enum dictionary type

This commit is contained in:
DecDuck
2024-11-06 11:38:49 +11:00
parent 9c4b6f35bb
commit f2e018277b

View File

@ -5,3 +5,7 @@ export type FilterConditionally<Source, Condition> = Pick<
export type KeyOfType<T, V> = keyof { export type KeyOfType<T, V> = keyof {
[P in keyof T as T[P] extends V ? P : never]: any; [P in keyof T as T[P] extends V ? P : never]: any;
}; };
type EnumDictionary<T extends string | symbol | number, U> = {
[K in T]: U;
};