Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Multiple exports of name 'xxx' import/export" error is thrown if types are exported #3136

Open
mykola-mokhnach opened this issue Jan 4, 2025 · 3 comments

Comments

@mykola-mokhnach
Copy link

mykola-mokhnach commented Jan 4, 2025

We have the following two files in the package:

m.ts

export interface Foo {}

export function f(foo: Foo): void {
}

index.ts

export {f} from 'm';
export type * from 'm';

Actual result:

While linting this code the plugin prints the following error for index.ts:

Multiple exports of name 'f' import/export

Expected result:

I don't expect the error to be thrown for the above case as the second expression in index.ts exports types, so there should be no duplicates.

Plugin version: 2.31.0

@ljharb
Copy link
Member

ljharb commented Jan 6, 2025

Does export { f }, type * from 'm'; work?

@mykola-mokhnach
Copy link
Author

Does export { f }, type * from 'm'; work?

Such format in the typescript causes a parsing error.

@ljharb
Copy link
Member

ljharb commented Jan 9, 2025

then this is definitely a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants