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

intellisense does not work as expected #76

Closed
sudo-suhas opened this issue May 14, 2018 · 7 comments
Closed

intellisense does not work as expected #76

sudo-suhas opened this issue May 14, 2018 · 7 comments

Comments

@sudo-suhas
Copy link

When I try to use this module from VSCode in common js, intellisense does not work correctly because of default export(I think):

image

image

This is mostly a nice to have and would be good if it could be fixed.

@SamVerschueren
Copy link
Collaborator

SamVerschueren commented May 14, 2018

If you want that in CJS, you need to use require('ow').default. It's not possible (as far as I know) to make the type definitions work with CJS and ESM. If you know of a way, please let us know and we would be happy to fix it.

@sudo-suhas
Copy link
Author

I see. Thanks anyway.

@sindresorhus
Copy link
Owner

@sudo-suhas Please do open a VSCode issue about this and link to this issue. It seems like something VSCode should support without having to use .default.

@SamVerschueren
Copy link
Collaborator

It's rather a typescript (language server) issue I guess.

@sudo-suhas
Copy link
Author

@sindresorhus I have reported the issue to VSCode - microsoft/vscode#49872.

@SamVerschueren The folks at VSCode usually move the issue to the Typescript repo if it needs to be addressed there. Let us see.

@sudo-suhas
Copy link
Author

Would the change suggested in microsoft/vscode#49872 (comment) be welcome?

@SamVerschueren
Copy link
Collaborator

Does that work? See my comment in the thread. I believe it breaks for ESM.

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

No branches or pull requests

3 participants