TypeScript

Awaited<T>

Në shqip përdoret i njëjti emër.

ShpjegimiSQ

Awaited<T> të jep tipin që merr pasi bën await — e „hap“ Promise-in, edhe nëse janë disa njëri brenda tjetrit.

EnglishEN

Awaited<T> gives you the type you get after await — it “unwraps” the Promise, even if several are nested.

Si ta mendosh

Si të shikosh çfarë do të gjesh kur ta hapësh pakon.

Lexoje në anglisht

Like seeing what you'll find when you open the parcel.

Shembull koditypescript

type A = Awaited<Promise<Promise<string>>>;   // string
type Termat = Awaited<ReturnType<typeof merrTermat>>;

Terma të lidhur