deno_lint logodeno_lint

All rules/no-legacy-type-assertion

Disallows the use of legacy <Type> value type assertion syntax in TypeScript

code.

<Type> value casting syntax is considered to be outdated because it does not work in JSX. Instead, you should use value as Type.

Invalid:

const foo = <Foo> bar;

Valid:

const foo = bar as Foo;