Npm-dts
lastmod 2026-11-10created 2022-04-152 edits
npm-dts is a command-line tool that merges the multiple .d.ts declaration files of a TypeScript project into a single index.d.ts. When code is bundled into a single file with Webpack or similar tools, the type declarations also need to be combined into one and specified in the types field of the npm package, and this tool automates that process. Internally, it generates declaration files with tsc, then wraps them in module declarations and merges them; to integrate with Webpack, use npm-dts-webpack-plugin.