You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
interfaceITest{// -> 'ITest' is defined but never used .eslint(@typescript-eslint/no-unused-vars)attr: string;}lettest: unknown;(testasITest)=null;// -> "'ITest' is not defined .eslint(no-undef)"consttest2: ITest={attr: 'a'};// -> no "no-undef" error
No linting error on (test as ITest) = null; since the interface is declared and also no linting issue on the interface ITest a bout it beeing unused.
Also the test2 should show up the same no-undef linting error.
Actual Result
interface ITest gives the linting error about not beeing used (see comment in repro code)
(test as ITest) gives the linting error about not beeing defined(see comment in repro code)
test2 has no linting error about no-undef Additional Info
Repro
tsconfig.json
Expected Result
No linting error on
(test as ITest) = null;
since the interface is declared and also no linting issue on theinterface ITest
a bout it beeing unused.Also the
test2
should show up the sameno-undef
linting error.Actual Result
interface ITest
gives the linting error about not beeing used (see comment in repro code)(test as ITest)
gives the linting error about not beeing defined(see comment in repro code)test2
has no linting error aboutno-undef
Additional Info
Versions
@typescript-eslint/parser
4.22.0
TypeScript
4.2.4
ESLint
7.25.0
node
v14.15.1
The text was updated successfully, but these errors were encountered: