Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

Fix: remove unnecessary TypeRef wrapper for ImportType (fixes #507) #508

Merged

Conversation

ikatyang
Copy link
Contributor

@ikatyang ikatyang commented Aug 4, 2018

Fixes #507

@ikatyang ikatyang changed the title Fix: no duplicate typeParameters in TypeReference's generic caused by ImportType (fixes #507) Fix: no duplicate typeParameters in TypeReference's generic (fixes #507) Aug 4, 2018
@ikatyang
Copy link
Contributor Author

ikatyang commented Aug 5, 2018

After second thought, I think there's no need to keep an unnecessary TSTypeReference there to wrap the TSImportType, and also this PR fixes the wrong type for TSImportType (TSLastTypeNode).

@ikatyang ikatyang changed the title Fix: no duplicate typeParameters in TypeReference's generic (fixes #507) Fix: remove unnecessary TypeRef wrapper for ImportType (fixes #507) Aug 5, 2018
lib/convert.js Outdated
case SyntaxKind.ImportType:
Object.assign(result, {
type: AST_NODE_TYPES.TSImportType,
parameter: convertChild(node.argument),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I renamed the argument to parameter since it looks like the naming convention here.

@JamesHenry
Copy link
Member

Thanks, @ikatyang! I'm going to release this with the "official" TypeScript 3 support shortly

@JamesHenry JamesHenry merged commit 7461462 into eslint:master Aug 6, 2018
@ikatyang ikatyang deleted the fix/import-type-with-generic-in-generic branch August 6, 2018 23:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants