Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Playground Link
Repro Code
const A = 0;
export type A = typeof A;
ESLint Config
module.exports = {
parser: "@typescript-eslint/parser",
{
"rules": {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error"
}
}
};
tsconfig
Expected Result
The difference is type A
was not exported, so I suspect it is due to const A
and type A
having the same name, it was mistakenly assumed that const A
had also been exported, so no error was reported.
const A = 0;
++ type A = typeof A;
-- export type A = typeof A;
Actual Result
No error reported
Additional Info
Related: oxc-project/oxc#8488 (comment)