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

[metascraper-clearbit] Typescript build error from keyvOpts #686

Closed
viscoci opened this issue Jan 8, 2024 · 1 comment
Closed

[metascraper-clearbit] Typescript build error from keyvOpts #686

viscoci opened this issue Jan 8, 2024 · 1 comment

Comments

@viscoci
Copy link
Contributor

viscoci commented Jan 8, 2024

upgraded from 5.21.3 to 5.43.1 caused typescript build to fail (running tsc in our project):

`node_modules/metascraper-clearbit/src/index.d.ts:9:14 - error TS2314: Generic type 'Options<TValue>' requires 1 type argument(s).`

node_modules/metascraper-clearbit/src/index.d.ts:9:14

Looks to me like there should be a generic passed in for the type. Manually adding <any> allowed the build to complete without type errors:

  keyvOpts?: import('@keyvhq/core').Options<any>,

package versions:

  • metascraper@5.43.1
  • metascraper-clearbit@5.43.1
  • @metascraper/helpers@5.43.1

yarn.lock entry for metascraper-clearbit:

metascraper-clearbit@^5.43.1:
  version "5.43.1"
  resolved "https://registry.yarnpkg.com/metascraper-clearbit/-/metascraper-clearbit-5.43.1.tgz#8bfc00efb19f1cf1c685be873c5e97f4a9470a15"
  integrity sha512-H1mY0+BrG4cOHI30U23rJnUlKroaNOS83n9wsCtRU1J/Qep2hpyoXq/ZuLsWlrZf1/zP/ki1BKqx03KAyuAO1w==
  dependencies:
    "@keyvhq/memoize" "~2.1.0"
    "@metascraper/helpers" "^5.43.1"
    async-memoize-one "~1.1.6"
    got "~11.8.6"
    lodash "~4.17.21"

yarn.lock entry for @keyvhq/memoize:

"@keyvhq/memoize@~2.1.0":
  version "2.1.0"
  resolved "https://registry.yarnpkg.com/@keyvhq/memoize/-/memoize-2.1.0.tgz#a045d217d9d9b257bf7df1946eaeab402185917f"
  integrity sha512-DT5wn2YYk2jNlXZZg+6tUGdpLlKCIPiARN7iXvSczvbl9f415xYmKPUCqAUMw2jOPOr62NuPlL0+o490V5rn3Q==
  dependencies:
    "@keyvhq/core" "^2.1.0"
    mimic-fn "~3.0.0"
@Kikobeats
Copy link
Member

@viscoci it seems this are the options we are trying to use
https://github.com/microlinkhq/keyvhq/blob/4a2d47ca2430d343925055db9d980910f7228a14/packages/core/src/index.d.ts#L32

but it's not exposed. Do you know how to do it properly?

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