Skip to content

fix: error TS6137: Cannot import type declaration files. Consider importing 'express' instead of '@types/express' #13

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

Conversation

smoke
Copy link
Contributor

@smoke smoke commented Jul 4, 2017

for more info see microsoft/TypeScript#16472

…orting 'express' instead of '@types/express'

for more info see microsoft/TypeScript#16472
@tinganho
Copy link
Owner

tinganho commented Jul 7, 2017

Is there any compile errors with the current solution? It seems like the issue you are referring to, suggests it's done correctly today, microsoft/TypeScript#16472 (comment).

@smoke
Copy link
Contributor Author

smoke commented Jul 7, 2017

With the newer version of TypeScript => 2.4.1 there is the pointed error.
I have referenced the issue as there, they have described that importing types directly is an error, instead packages from which types are used should be imported.
microsoft/TypeScript#16472 (comment)

@tinganho
Copy link
Owner

tinganho commented Jul 7, 2017

But your change imports types directly no?

Sorry, I didn't look at the diff correctly. But you are right.

@tinganho tinganho merged commit a4678af into tinganho:master Jul 7, 2017
@tinganho
Copy link
Owner

tinganho commented Jul 7, 2017

Thanks @smoke !

@smoke smoke deleted the fix-error-TS6137-cannot-import-type-declaration-files branch July 7, 2017 09:12
@tinganho
Copy link
Owner

tinganho commented Jul 7, 2017

Published now on NPM [email protected]

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

Successfully merging this pull request may close these issues.

2 participants