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

fix: false positives for typescript type + value export #1319

Merged
merged 1 commit into from
Apr 12, 2019
Merged

fix: false positives for typescript type + value export #1319

merged 1 commit into from
Apr 12, 2019

Conversation

bradzacher
Copy link
Contributor

Fixes #1318

@ljharb
Copy link
Member

ljharb commented Apr 12, 2019

This seems like it might overlap with #923?

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 97.764% when pulling abb354a on bradzacher:export-ts-type-value into 70a59fe on benmosher:master.

@bradzacher
Copy link
Contributor Author

@ljharb to prevent double commenting - #1318 (comment)

if ([
'TSTypeAliasDeclaration',
'TSInterfaceDeclaration',
].includes(node.declaration.type)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

includes isn't available on node 4; we'll need to add the array-includes package here.

export const Foo = 1;
export type Foo = number;
`,
...parserConfig,
Copy link
Member

@ljharb ljharb Apr 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, object spread isn't on node < 8.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased and fixed.

@ljharb ljharb merged commit 2098797 into import-js:master Apr 12, 2019
ljharb added a commit that referenced this pull request Apr 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

import/export: false positives for typescript type + value export
3 participants