avoiding-angle-bracket-assertions

Installation
SKILL.md

Avoiding Angle-Bracket Type Assertions

The angle-bracket type assertion syntax (<Type>value) is deprecated in TypeScript, especially in TSX files where it conflicts with JSX syntax.

Why Avoid <Type> Syntax

  • JSX conflict: Incompatible with TSX files (React, Preact, etc.)
  • Inconsistent syntax: Modern TypeScript uses as Type
  • Reduced readability: Looks like generics or JSX
  • Tooling issues: Some tools don't handle it well

Modern Alternative: as Type

Basic Replacement

Deprecated:

const value = <string>someValue;
const num = <number>input;
Related skills
Installs
4
First Seen
Feb 4, 2026