additional polish and QoL features

This commit is contained in:
DecDuck
2024-10-22 09:43:00 +11:00
parent 03a37f72aa
commit 93bc143dac
7 changed files with 353 additions and 269 deletions

7
server/internal/utils/types.d.ts vendored Normal file
View 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;
};