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.

Generate `.ts` files instead of `.d.ts` files

See original GitHub issue

Instead 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:closed
  • Created 2 years ago
  • Reactions:7
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
krzkaczorcommented, Oct 27, 2021

Released in 7

2reactions
krzkaczorcommented, Aug 22, 2021

It’s planned to be fixed in the next major version.

Read more comments on GitHub >

github_iconTop 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 >

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