The `as` operator tells TypeScript’s type checker that an expression has a particular type. It can help when a type predicate leads to an incorrect inference, but it does not change the expression’s runtime value. Use it cautiously: the checker can only rely on the type information you provide. section 2.1.3
Override an incorrect inference
if (isShortString(stringOrNumber)) { const shortString = stringOrNumber as string; // type: string // ... } section 2.1.3



