tsafe
GitHub
  • 👋What is tsafe?
  • ⚙️How to import
  • assert
  • Equals
  • id
  • is
  • objectKeys
  • exclude
  • isAmong
  • symToStr
  • ReturnType
  • Parameters
  • Param0
  • typeGuard
  • capitalize/uncapitalize
  • MethodNames
  • isPromiseLike
  • flip
  • objectEntries
  • objectFromEntries
  • UnionToIntersection
  • 🚧withDefaults
  • 📉UnpackPromise
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub

UnpackPromise

Deprecated. Extract the packed type of a Promise

PreviouswithDefaults

Last updated 2 years ago

Was this helpful?

In TypeScript 4.5 have been introduced the type that does just what UnpackPromise does.

declare const prStr: Promise<string>;

//str is of type string
declare const str: UnpackPromise<typeof pr>;
📉
Awaited