/** Alias type for value that can be null */ export type Nullable = T | null; /** * Alias type for number that are floats * @ignorenaming */ export type float = number; /** * Alias type for number that are doubles. * @ignorenaming */ export type double = number; /** * Alias type for number that are integer * @ignorenaming */ export type int = number; /** Alias type for number array or Float32Array */ export type FloatArray = number[] | Float32Array; /** Alias type for number array or Float32Array or Int32Array or Uint32Array or Uint16Array */ export type IndicesArray = number[] | Int32Array | Uint32Array | Uint16Array; /** * Alias for types that can be used by a Buffer or VertexBuffer. */ export type DataArray = number[] | ArrayBuffer | ArrayBufferView; /** * Alias type for primitive types * @ignorenaming */ type Primitive = undefined | null | boolean | string | number | Function; /** * Type modifier to make all the properties of an object Readonly */ export type Immutable = T extends Primitive ? T : T extends Array ? ReadonlyArray : /* T extends Map ? ReadonlyMap : // es2015+ only */ DeepImmutable; /** * Type modifier to make all the properties of an object Readonly recursively */ export type DeepImmutable = T extends Primitive ? T : T extends Array ? DeepImmutableArray : /* T extends Map ? DeepImmutableMap : // es2015+ only */ DeepImmutableObject; /** * Type modifier to make object properties readonly. */ export type DeepImmutableObject = { readonly [K in keyof T]: DeepImmutable }; /** @hidden */ interface DeepImmutableArray extends ReadonlyArray> { } /** @hidden */ /* interface DeepImmutableMap extends ReadonlyMap, DeepImmutable> {} // es2015+ only */