Skip to main content

3 docs tagged with "Narrow"

View All Tags

Narrow

Narrow is defined as: to reduce static type T to a (narrowed down) subset of T. Topics on: . Read more: JS, TS, TS Syntax, Type Guard, Narrow | Full-Stack Wiki

Type Guard

Type Guard is defined as: Runtime Type-Check to Narrow Type of Variable. Topics on: Type Guard used when Type too general, requires Narrow, typeof & instanceof

unknown

unknown is defined as: Top Type to rep any value but also make it illegal to use (w/o Narrow). Topics on: //@ts-expect-error: Object is of Type 'unknown', unkno