-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support export =
TypeScript syntax
#1818
Comments
hm, this test case is passing for me on master. is there more context you could provide? also are you sure that |
I used a yarn resolution to update to the latest version and the lock-file is updated yes. The PR is here: xeroxinteractive/rollup-plugin-strip-exports#268 if you want to take a look. I will try and create a minimal repro tomorrow :) |
I see the line that's erroring: https://github.com/benmosher/eslint-plugin-import/blob/master/src/ExportMap.js#L565 but i have no idea how to trigger it :-/ If you can put up a PR with a failing test, I can fix it in the next release. |
@ljharb it seems to be occurring when importing the |
@ljharb any ideas when this might get published to npm? |
nope! hopefully soon tho. |
I still get "TypeError: Cannot read property 'name' of undefined" when importing an index.d.ts with
It happens when importing a namespace from this file:
I added
It crashes because the expression has no name nor id fields. I tried hard to generate a small test case, but I could not reproduce the issue then. |
@dpinol |
@dpinol yes, please do file a separate issue and i'll try to get to it ASAP. |
When using the TypeScript syntax
export = function name() {}
I get the following error:Swapping the code from
export = function name() {}
toexport default function name() {}
resolves the issue, so it seems the plugin is not accounting for theexport =
syntax.Using eslint-plugin-import@2.21.2 with eslint@7.2.0 and @typescript-eslint/parser@3.2.0
The text was updated successfully, but these errors were encountered: