Open pmcelhaney opened 3 years ago
const th = `<th aria-sort="${sortDirection}">header</th>`
The above code produces the following error
Type 'string' is not assignable to '"ascending" | "descending" | "none" | "other"'
Without using TypeScript, I don't know how I could make the type any more specific than 'string'.
According to the docs:
Assignments in your HTML are typed checked just like it would be in Typescript.
So the answer is clearly not "just use TypeScript". Can the rule be relaxed when the parser is not TypeScript?
As a work-around, I was able to suppress this warning by adding <!-- @ts-ignore--> to the HTML, per #1.
<!-- @ts-ignore-->
The above code produces the following error
Without using TypeScript, I don't know how I could make the type any more specific than 'string'.
According to the docs:
So the answer is clearly not "just use TypeScript". Can the rule be relaxed when the parser is not TypeScript?