-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTypeUtils.ts
More file actions
14 lines (11 loc) · 808 Bytes
/
TypeUtils.ts
File metadata and controls
14 lines (11 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
type TranslationTableKeys = import('./src/app/localization/strings').TranslationTableKeys;
type Draft<T> = import('@/immer').Draft<T>;
type Immutable<T> = import('@/immer').Immutable<T>;
type ValidTypeString = keyof {[TKey in keyof TranslationTableKeys as TKey extends `${infer T}_add_button` ? `${T}s_no_${T}s` extends keyof TranslationTableKeys ? `${T}_button` extends keyof TranslationTableKeys ? T : never : never : never]: any};
type KeyForType<TObject extends Record<any, any>, TTargetType extends any> = keyof TObject & keyof {[TKey in keyof TObject as TObject[TKey] extends TTargetType ? TKey : never]: never};
type TrueImmutable<T> = Immutable<{a: T}>['a'];
type TrueDraft<T> = Draft<{a: T}>['a'];
declare module '*/public/schemas/Info.xsd' {
const value: string;
export default value;
}