Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "src/types"

format

These are where we put all the type aliases, interfaces, and enumerations that are shared between multiple things, or may be useful to use without us.

Index

Type aliases

Item

Item<T>: Unpromise<T> extends Array<infer U> ? U : Unpromise<T> extends Iterable<infer U> ? U : never

Provides the type of elements within an Iterable, which may be wrapped in one or more promises. The element type is also unwrapped any promises.

Type parameters

  • T

IterableOfPromisables

IterableOfPromisables<T>: Iterable<Promisable<T>>

Represents an Iterable that is not a promise but an actual value that is an Iterable, although it may produce either values or promises of values or both.

Type parameters

  • T

Promisable

Promisable<T>: T | PromiseLike<T>

Something which can be resolved: that is, either a value or a promise of a value.

Type parameters

  • T

PromisableIterable

PromisableIterable<T>: Promisable<IterableOfPromisables<T>>

An Iterable or a promise of an Iterable. Its elements are any mix of type T and/or PromiseLike<T>. Used as a type for arguments.

Type parameters

  • T

Settlement

Settlement<T>: PromiseSettledResult<T> & Fulfillment<T> | Rejection

Equivalent to a PromiseSettledResult, but specific to our classes.

Type parameters

  • T

SimplifiedPromisable

SimplifiedPromisable<T>: Promisable<Unpromise<T>>

Guarantees that there is at most one PromiseLike wrapper.

Type parameters

  • T

SimplifiedPromise

SimplifiedPromise<T>: Promise<Unpromise<T>>

Guarantees that there is only one Promise wrapper.

Type parameters

  • T

SimplifiedPromiseLike

SimplifiedPromiseLike<T>: PromiseLike<Unpromise<T>>

Guarantees that there is only one PromiseLike wrapper.

Type parameters

  • T

Unpromise

Unpromise<T>: T extends PromiseLike<infer U> ? Unpromise<U> : T extends Promisable<infer U> ? U extends T ? T : Unpromise<U> : T

Provides the type of the resolution value after unwrapping all the PromiseLike and Promisable interfaces (if any).

Type parameters

  • T

Generated using TypeDoc