Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "Class/PromiseOf"

Index

Type aliases

Type aliases

PromiseOf

PromiseOf<P>: PromiseOf<P>

Get the instance type wrapped within a Promise

Type parameters

  • P: any

    Promise

returns

any

example

import {C} from 'ts-toolbelt'

const promise = new Promise<string>((res, rej) => res('x'))

type test0 = C.PromiseOf<typeof promise>  // string
type test1 = C.PromiseOf<Promise<number>> // number

Made with ❤️ by pirix-gh. Documentation generated by TypeDoc.