no-as-type-assertion false positive for const assertions (ts 3.4)
Closed this issue · 1 comments
WiseBird commented
In typescript 3.4 new syntax was introduced - const assertions
// Type '"hello"'
let x = "hello" as const;
// Type 'readonly [10, 20]'
let y = [10, 20] as const;
// Type '{ readonly text: "hello" }'
let z = { text: "hello" } as const;
no-as-type-assertion highlights this usages as errors
ajafff commented
That's because you also write it as <const>"hello"