Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 415 Bytes

no-as-type-assertion.md

File metadata and controls

15 lines (11 loc) · 415 Bytes

no-as-type-assertion

The complete opposite of the tslint core rule no-angle-bracket-type-assertion plus the ability to automatically fix all findings.

This can not be applied to .tsx and .jsx files because the <T> syntax is handled as JSX opening element.

// Not passing
let foo = bar as number;
let baz = bar as any as string;

// Passing
let foo = <number>bar;
let baz = <string><any>bar;