Options
All
  • Public
  • Public/Protected
  • All
Menu

Type aliases

Type aliases

Promise

Promise<A>: globalThis.Promise<A extends globalThis.Promise<infer X> ? X : A>

Create an asynchronous operation like the original Promise type but this one prevents promises to be wrapped within more promises (not possible).

Type parameters

  • A: any

example

import {A} from 'ts-toolbelt'

type test0 = A.Promise<Promise<number>> // Promise<number>
type test1 = Promise<Promise<number>> // Promise<Promise<number>>

  • Inherited
  • Protected
  • Private
  • Static
  • Module
  • Object
  • Property
  • Function
  • Variable
  • Index
  • Type
  • Class
  • Interface
  • Enum
  • Constructor
  • Getter/Setter
Made with ❤️ by pirix-gh. Documentation generated by TypeDoc.