.d.ts fix
See original GitHub issueI 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:
- Created 3 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top 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 >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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
And
dequal@2.0.1
Fixed in
v2.0.2