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

allow es imports, update ts and use their helper methods #27

Merged
merged 3 commits into from
Jun 19, 2020

Conversation

connor4312
Copy link
Member

I wanted to pipe in my TS directly since I only use the incremental TS compiler in js-debug which didn't seem to place nice with this package.

I noticed I wasn't getting any results since vscode-nls didn't understand ES6 imports. There actually was a function isImportNode, but that was not used anywhere. I made that detect import * as nls and import nls = require(...) expressions.

While I was there I bumped TS to the latest version which includes predicate methods so, we no longer need all our own is* functions.

@connor4312 connor4312 requested a review from dbaeumer June 17, 2020 19:47
@dbaeumer
Copy link
Member

@connor4312 thanks. Can you tell me when the TS compiler will generate the __importStar code?

@connor4312
Copy link
Member Author

This happens when targeting commonjs when esModuleInterop is turned on: https://www.typescriptlang.org/play/?module=1&ssl=8&ssc=2&pln=3&pc=11#code/JYWwDg9gTgLgBAKjgQwM5wGYQpqERwDkWEhA3AFAUkB0ARslABQCUZQA

@dbaeumer dbaeumer merged commit 242397a into master Jun 19, 2020
@dbaeumer dbaeumer deleted the es-imports branch June 19, 2020 07:35
@dbaeumer
Copy link
Member

Thanks for the PR. Merged.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants