Closed
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.
Relevant Package
types
Playground Link
No response
Repro Code
import { TSESTree } from "@typescript-eslint/types";
import type { TSESTree } from "@typescript-eslint/types";
ESLint Config
tsconfig
Expected Result
The first line should have the following error, which can be solved by switching it to the second line.
'TSESTree' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.ts(1485)
Actual Result
Both lines result in no errors. When this is transpiled with verbatimModuleSyntax
the non-type-only import
statement ends up in the transpiled .js output file which fails at runtime (as there is no TSESTree value import).
Additional Info
This should be incredibly easy to fix, expect a PR shortly.
Versions
package | version |
---|---|
@typescript-eslint/types |
8.22.0 |
TypeScript |
5.8.3 |