Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed
Description
This issue was initially reported here:eslint/typescript-eslint-parser#444
What version of TypeScript are you using?
2.6.1
What version oftypescript-eslint-parser are you using?
12.0.0
What code were you trying to parse?
// unexected error: Multiple exports of name 'Foo'. (import/export)exportconstFoo=1;// unexected error: Multiple exports of name 'Foo'. (import/export)exporttypeFoo=1;
The import/export rule is defined here:https://github.com/benmosher/eslint-plugin-import/blob/219a8d2e5af230f73b4754f725916843645889ff/docs/rules/export.md
Is this an issue to log here or with the eslint-plugin-import project?
We've decided to disable this ESLint rule as TypeScript also provides similar functionality anyway, but logging this just for others/reference.
For context, this pattern is common when usingunionize:
import{unionize,ofType}from'unionize'exportconstAction=unionize({ADD_TODO:ofType<{id:string;text:string}>(),SET_VISIBILITY_FILTER:ofType<'SHOW_ALL'|'SHOW_ACTIVE'|'SHOW_COMPLETED'>(),TOGGLE_TODO:ofType<{id:string}>(),});exporttypeAction=typeofAction._Union;