tutanota/types/globals.d.ts

29 lines
822 B
TypeScript
Raw Normal View History

/**
* @file Common declarations across packages. Should be included in each package.
*/
declare type TimeoutID = ReturnType<setTimeout>
declare type AnimationFrameID = ReturnType<requestAnimationFrame>
declare interface Class<T> {
2022-12-27 15:37:40 +01:00
new (...args: any[]): T
2021-12-28 13:53:11 +01:00
}
2022-12-27 15:37:40 +01:00
declare type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array
declare type Values<T> = T[keyof T]
2022-12-27 15:37:40 +01:00
declare type PropertyType<T, K> = K extends keyof T ? T[K] : never
declare type Id = string
2023-01-12 16:48:28 +01:00
declare type IdTuple = Readonly<[Id, Id]>
2022-12-27 15:37:40 +01:00
declare type Writeable<T> = { -readonly [P in keyof T]: T[P] }
2022-12-27 15:37:40 +01:00
declare type None = null | undefined
declare module "*.wasm" {
2024-04-29 09:24:21 +02:00
const loadWasm: (options?: { forceFallback?: boolean }) => Promise<WASMExports>
export { loadWasm }
}