question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Keyv v4.2.5 Error - Typescript Compiler Error

See original GitHub issue

Node: v16.15.0 Typescript: 4.6.4

node_modules/keyv/src/index.d.ts:30:35 - error TS2371: A parameter initializer is only allowed in a function or constructor implementation.

30  get<Raw extends boolean = false>(key: string | string[] = [], options?: {raw?: Raw}):
                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/keyv/src/index.d.ts:45:9 - error TS2371: A parameter initializer is only allowed in a function or constructor implementation.

45  delete(key: string | string[] = []): Promise<boolean>;
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 2 errors in the same file, starting at: node_modules/keyv/src/index.d.ts:30

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:6
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

6reactions
jaredwraycommented, May 10, 2022

We should have an update in the next hour on this.

4reactions
theaussiepomcommented, May 10, 2022

@jaredwray - this now builds correctly. Thank you for getting to this so quickly

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript error TS1005: ';' expected (II) - Stack Overflow
Your installation is wrong ; you are using a very old compiler version (1.0.3.0). tsc --version should return a version of 2.5.2.
Read more >
TypeScript Errors shown for latest version when project ...
I have the latest version of TypeScript installed in VS (2.5.3), and a project which uses 2.3.4. Changes introduced between TypeScript 2.3.4 and...
Read more >
node_modules/@types/node/index.d.ts(50,14): error TS2687 ...
Since 7.0.8, when using node_modules/@types/node/index.d.ts(50,14): error TS2687: All declarations of 'iterator' must have identical modifiers.
Read more >
Documentation - TypeScript 4.5
To help catch this mistake, in TypeScript 4.5, it is an error to add a top-level field which matches any of the available...
Read more >
Documentation - TypeScript 4.4
When we pass an object literal to something with an expected type, TypeScript will look for excess properties that weren't declared in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found