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

Using QuickLRU as cache does not work as documented #2393

Open
Llois41 opened this issue Dec 2, 2024 · 1 comment
Open

Using QuickLRU as cache does not work as documented #2393

Llois41 opened this issue Dec 2, 2024 · 1 comment

Comments

@Llois41
Copy link

Llois41 commented Dec 2, 2024

Describe the bug

  • Node.js version: 20.18.1
  • OS & version: MacOS 15.1.1 (24B91)

Actual behavior

The cache documentation states that QuickLRU could be used as a cache for got but instead it throws following TypeScript Error:

image

Expected behavior

Documentation is up-to-date or typings are fixed

Code to reproduce

import QuickLRU from 'quick-lru';
import got from 'got';

const cache = new QuickLRU({maxSize: 1000})

await got('https://sindresorhus.com', {cache});

tsconfig.json

{
  "compilerOptions": {
    "module": "nodenext",
    "moduleResolution": "nodenext",
    "types": []
  },
  "files": [],
  "include": [
    "index.ts"
  ],
  "exclude": [
    "node_modules",
    "build"
  ],
}

Checklist

  • [ x ] I have read the documentation.
  • [ x ] I have tried my code with the latest version of Node.js (latest 20.x version) and Got.
@tobenna
Copy link

tobenna commented Dec 10, 2024

Looks like it's the same as #1656

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

2 participants