export type Present = Exclude; export type Nullable = T | null; export type Optional = T | undefined; export type Maybe = Nullable | Optional; export type FIXME = T; /** * A special version of `Optional` that is used for values that are expected to be initialized. This * documents the intent that the value will be initialized before it is used, and therefore that * null assertions or `?.` are not appropriate. */ export type Initializable = T | undefined; export type Dict = Record; /** * A type that has an index signature, but nothing else is know about it. Useful in generic code * that needs to index into an opaque, user-specified object. */ export type Indexable = Dict; export type DictValue = D extends Dict ? V : never; export interface Unique { 'Unique [id=ada0f31f-27f7-4ab0-bc03-0005387c9d5f]': T; } export type Recast = (T & U) | U; // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type export type AnyFn = Function; /** * This is needed because the normal IteratorResult in the TypeScript * standard library is generic over the value in each tick and not over * the return value. It represents a standard ECMAScript IteratorResult. */ export type RichIteratorResult = | { done: false; value: Tick; } | { done: true; value: Return; }; export type Destroyable = object; export type Destructor = (destroyable: T) => void;