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

import * as Contentful from "contentful"; produces error #163

Closed
AndrisBorbas opened this issue Sep 7, 2022 · 3 comments · Fixed by #205
Closed

import * as Contentful from "contentful"; produces error #163

AndrisBorbas opened this issue Sep 7, 2022 · 3 comments · Fixed by #205

Comments

@AndrisBorbas
Copy link

AndrisBorbas commented Sep 7, 2022

This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'.ts(1371)

In the generated files it should import contentful only as a type because if 'importsNotUsedAsValues' is set to error then it produces an error.

Should be: import type * as Contentful from "contentful";

@marcolink
Copy link
Collaborator

Hi @AndrisBorbas,

thanks for the callout - would you be able to create a PR for that?

@AndrisBorbas
Copy link
Author

Hi, sorry for the late reply, just noticed it. I tried looking into the code, but I couldn't find where that line gets generated.

@marcolink
Copy link
Collaborator

Hi @AndrisBorbas
I have re-worked they way imports are generated. The PR is currently in review, maybe we want to have a look. Any comments are welcome :)

#205

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 a pull request may close this issue.

2 participants