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.

I use strict typescript. When I use klona/full I get the following error: Could not find a declaration file for module 'klona/full'. 'node_modules/klona/full/index.js' implicitly has an 'any' type. Try `npm install @types/klona` if it exists or add a new declaration (.d.ts) file containing `declare module 'klona/full';`

I fixed it by creating a custom definition file, but it would be nice if it was already defined.

declare module 'klona/full' {
    export function klona<T>(input: T): T;
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lukeedcommented, Aug 17, 2020

And dequal@2.0.1

1reaction
lukeedcommented, Aug 17, 2020

Fixed in v2.0.2

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compiler creates broken .d.ts files with "... more ..." in it #40354
The problem seems to only happen with relatively large code bases. The problem can be reproduced with Version 4.1.0-dev.20200902 as follows.
Read more >
Typescript: .d.ts file not recognized - Stack Overflow
There might be two issues here: 1.) You need to augment Window interface in global scope. Either remove all import / export keywords...
Read more >
Fix index.d.ts import paths with one bash command
Fix index.d.ts import paths with one bash command ... The build is running green, and so index.d.ts being generated as well.
Read more >
What Are *.d.ts files? How to Use *.d.ts Files in TypeScript?
How to use *. d. ts files.
Read more >
TypeScript errors and how to fix them
error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier. Broken Code ❌. index.d ...
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