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.

Current Behavior

Every module has its own .d.ts module

Desired Behavior

Bundle the typedefs into a single .d.ts module

Suggested Solution

https://www.npmjs.com/package/rollup-plugin-dts

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:5
  • Comments:20 (8 by maintainers)

github_iconTop GitHub Comments

13reactions
aleclarsoncommented, Jun 7, 2019

This is an overview of .d.ts bundlers that I’ve tried to use with Rollup.

rollup-plugin-dts

  • 🎉 Easily plugs into Rollup
  • 🎉 No notable issues?

dts-bundle-generator

  • 👎 Dependencies must have .d.ts modules or an associated @types package
  • 👎 Must write your own Rollup plugin

dts-generator

  • 😑 Emits a declare module statement for every .ts module
  • 👎 Must write your own Rollup plugin

@microsoft/api-extractor

  • 👎 Must use intermediate .d.ts modules
  • 👎 Verbose configuration
  • 👎 Must write your own Rollup plugin
5reactions
aleclarsoncommented, Jun 7, 2019

Now that https://github.com/Swatinem/rollup-plugin-dts/pull/32 is merged, my needs are satisfied by rollup-plugin-dts and I would recommend it for tsdx too. 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeStrong/dts-bundle: Export TypeScript .d.ts files ... - GitHub
This module is a naïve string-based approach at generating bundles from the .d.ts declaration files generated by a TypeScript compiler.
Read more >
dts-bundle - npm
Export TypeScript .d.ts files as an external module definition. ... Start using dts-bundle in your project by running `npm i dts-bundle`.
Read more >
How to Bundle *.d.ts Declaration Files with API-Extractor - Floriel
It allows you to make your entire folder of .d.ts file bundled into one. Just like your source file are bundled into one...
Read more >
Export single .d.ts from several typescript files + entrypoint
the compiler will also generate an entrypoint.d.ts file (that re-exports the ... it was pretty straight forward: https://github.com/TypeStrong/dts-bundle.
Read more >
dts-bundle | Export TypeScript .d.ts files as an external module ...
Export TypeScript .d.ts files as an external module definition. dts-bundle is a tool in the npm Packages category of a tech stack.
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