Invalid declaration file index.d.ts
See original GitHub issueHello,
I wanted to utilize the elastic-builder (1.0.2), however during typescript transpilation I get the following error:
ERROR in node_modules/elastic-builder/index.d.ts (280,1): A 'declare' modifier is required for a top level declaration in a .d.ts file.
this refers to the top-level definition:
class Query {
which is not allowed since typescript 0.9. (https://typescript.codeplex.com/wikipage?title=Known breaking changes between 0.8 and 0.9)
Could you adapt your building / publishing procedure to produce a valid declaration file?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Invalid TypeScript declaration files (.d.ts) emitted when mono ...
It seems Parcel fails to emit valid TypeScript declaration files (.d.ts) when the input source is importing any of its mono-repo related ...
Read more >generated declaration file (d.ts) with bad imports
These import statements are output in the d.ts declaration files. That makes the declaration files invalid because there are no sass files ...
Read more >TypeScript errors and how to fix them
A list of common TypeScript errors and how to fix them.
Read more >How to fix error TS7016: Could not find a declaration file for ...
Try `npm install @types/XYZ` if it exists or add a new declaration (.d.ts) file containing `declare module 'XYZ';. If XYZ is a direct...
Read more >Module: Class - TypeScript: Documentation
/*~ This is the module template file for class modules. *~ You should rename it to index.d.ts and place it in a folder...
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
Wow, I would have offered to take a look on the weekend, but you were a lot faster. 1.0.3 works fine for me now. Thank you very much!
@rado0x54 I was actually imitating some of the modules I found in DefinitelyTyped. Dunno about the real impact of export type. I was able to use it in the test file with ES6 import.