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

'Cheerio' refers to a value, but is being used as a type in server-test-utils/types #1737

Open
sk-pub opened this issue Nov 18, 2020 · 3 comments
Labels

Comments

@sk-pub
Copy link
Contributor

sk-pub commented Nov 18, 2020

Version

1.1.1

Steps to reproduce

  1. Check the file https://github.com/vuejs/vue-test-utils/blob/dev/packages/server-test-utils/types/index.d.ts
  2. Typescript compiler shows the error 'Cheerio' refers to a value, but is being used as a type here. Did you mean 'typeof Cheerio'?ts(2749)

Expected behaviour

There should be no error/warning from the TS compiler.

Actual behaviour

This issue prevents TypeScript compilation.

@lmiller1990
Copy link
Member

Seem you found a fix - will you be making a PR?

@sk-pub
Copy link
Contributor Author

sk-pub commented Nov 20, 2020

@lmiller1990 I thought, that I know how to fix it. But it turned out, that I don't. The Cheerio package does not export the Cheerio interface and it seems, that there is no way to explicitly import it.

@lmiller1990
Copy link
Member

lmiller1990 commented Nov 20, 2020

I see - so maybe something needs to happen in Cheerio to expose the types. Sounds like we cannot fix it in here for now?

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

No branches or pull requests

2 participants