You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lib/src/util/support/types.ts

12 lines
426 B

/** Type alias for something that may or may not be wrapped in a promise. */
export type Awaitable<T> = T | Promise<T>
/** Type alias for something that may be undefined. */
export type Maybe<T> = T | undefined
/** Type alias for a callback that accepts a typed argument. */
export type ParameterizedCallback<T> = ((arg: T) => any)
/** A key-value form of a given type. */
export type KeyValue<T> = {key: string, value: T}