mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-14 16:51:15 +10:00
additional polish and QoL features
This commit is contained in:
7
server/internal/utils/types.d.ts
vendored
Normal file
7
server/internal/utils/types.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
export type FilterConditionally<Source, Condition> = Pick<
|
||||
Source,
|
||||
{ [K in keyof Source]: Source[K] extends Condition ? K : never }[keyof Source]
|
||||
>;
|
||||
export type KeyOfType<T, V> = keyof {
|
||||
[P in keyof T as T[P] extends V ? P : never]: any;
|
||||
};
|
||||
Reference in New Issue
Block a user