This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
export enum
doesn’t register as an export #345
Closed
Description
What version of TypeScript are you using?
2.3.4
What version of typescript-eslint-parser
are you using?
4.0.0
What code were you trying to parse?
// foo.ts
export enum Foo {
Bar,
Baz,
}
// bar.ts
/* eslint "import/named": "error" */
import { Foo } from './foo'
What did you expect to happen?
No errors — Foo
is exported in foo.ts
, and it’s imported in bar.ts
What happened?
Foo not found in './foo.ts' (import/named)
It looks like this should be parsed as
ExportNamedDeclaration {
// ...
declaration: TSEnumDeclaration
// ...
}
instead of
TSEnumDeclaration {
// ...
modifiers: [
TSExportKeyword
]
// ...
}
Also, the TSEnumDeclaration
node should have the name
property aliased to id
so it’s compatible with ClassDeclaration
nodes.