Generate `.ts` files instead of `.d.ts` files
See original GitHub issueInstead of generating declaration files with the .d.ts
extension TypeChain should generate .ts
files for contract interfaces.
TypeScript does not copy declaration files when building a project. This leads to issues when compiling contract bindings in a package to distribute them: Dependents cannot resolve the declaration files because they are not in the correct location.
It should be easy to generate .ts
files instead of .d.ts
files since contract interfaces only include type information and no executable code. I would probably also be a good idea to use import type
in the generated files.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Documentation - Creating .d.ts Files from .js files - TypeScript
Setting up your Project to emit .d.ts files · Add TypeScript to your dev dependencies · Add a tsconfig.json to configure TypeScript ·...
Read more >How do you produce a .d.ts "typings" definition file from an ...
Hit the Snooze Button · -d ( --declaration ): generates the *.d.ts files · --declarationDir dist/lib : Output directory for generated declaration ...
Read more >Handbook - Creating .d.ts Files from .js files - TypeScript
Setting up your Project to emit .d.ts files · Add TypeScript to your dev dependencies · Add a tsconfig.json to configure TypeScript ·...
Read more >What is a “.d.ts” file in TypeScript? | by Ohans Emmanuel
d.ts files are called type declaration files. They exist for one purpose only: to describe the shape of an existing module and they...
Read more >What Are *.d.ts files? How to Use *.d.ts Files in TypeScript?
d. ts files ? How to Use *. d. ts Files in TypeScript ?
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
Released in 7
It’s planned to be fixed in the next major version.