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.
Closed
Description
What version of TypeScript are you using?
2.6.1
What version of typescript-eslint-parser
are you using?
12.0.0
What code were you trying to parse?
// unexected error: Multiple exports of name 'Foo'. (import/export)
export const Foo = 1;
// unexected error: Multiple exports of name 'Foo'. (import/export)
export type Foo = 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 using unionize:
import { unionize, ofType } from 'unionize'
export const Action = unionize({
ADD_TODO: ofType<{ id: string; text: string }>(),
SET_VISIBILITY_FILTER: ofType<'SHOW_ALL' | 'SHOW_ACTIVE' | 'SHOW_COMPLETED'>(),
TOGGLE_TODO: ofType<{ id: string }>(),
});
export type Action = typeof Action._Union;