feat(type utils): add enum dictionary type

This commit is contained in:
DecDuck
2024-11-06 11:38:49 +11:00
parent ad00fc7d7f
commit 3c24d88375
+4
View File
@@ -5,3 +5,7 @@ export type FilterConditionally<Source, Condition> = Pick<
export type KeyOfType<T, V> = keyof {
[P in keyof T as T[P] extends V ? P : never]: any;
};
type EnumDictionary<T extends string | symbol | number, U> = {
[K in T]: U;
};