DTS-BUNDLE-GENERATOR.JS(1)
π dts-bundle-generator.js β the manual, but make it make sense π
okay bestie, listen. this is the user command page for dts-bundle-generator.js β a tool that builds .d.ts bundles straight out of your TypeScript code. yes, the whole point is smashing all your type declarations into one cute little file. it's giving "one file to rule them all" energy and honestly? obsessed. π
β¨ NAME β¨
dts-bundle-generator.js β the tool that generates .d.ts bundles from typescript code. no cap, that's literally the job. π¦
πΈ SYNOPSIS πΈ
dts-bundle-generator [options] <file(s)>
so you feed it options plus one or more files, and it does its thing. periodt. π
π OPTIONS π
here come the flags, and there are a LOT of them, so grab a snack π
--helpβ shows you the help. that's it, that's the flag. the "hi bestie, what do you need" of flags. π-o,--out-fileβ the file name of the generatedd.ts. your bundle's new home address. π--verboseβ turns on verbose logging. it will yap. [default:false] π--silentβ disables any logging except errors. the "do not perceive me" mode. [default:false] π€«--no-checkβ skips validation of the generatedd.tsfile. the vibe check is off. [default:false] π--fail-on-classβ fails if the generated dts contains a class declaration. it sees a class and it's over. [default:false]--external-inlinesβ array of package names fromnode_modulesto inline typings from. the used types get inlined right into the output file. [array]--external-importsβ array of package names fromnode_modulesto import typings from. the used types will be imported usingimport { First, Second } from 'library-name';. by default all libraries will be imported (except inlined libraries and libraries from@types). [array]--external-typesβ array of package names from@typesto import typings from via the triple-slash reference directive. by default all packages are allowed and will be used according to their usages. [array]--umd-module-nameβ name of the UMD module. if you specify it thenexport as namespace ModuleName;will be emitted. [string] β¨--projectβ path to thetsconfig.jsonfile that will be used for the compilation. tell it which tsconfig is the main character. [string]--sortβ sort output nodes. alphabetize the whole thing, lowkey satisfying. [boolean] [default:false]--inline-declare-globalβ enables inlining ofdeclare globalstatements contained in files which should be inlined (all local files and packages from--external-inlines). [boolean] [default:false]--inline-declare-externalsβ enables inlining ofdeclare modulestatements of the global modules (e.g.declare module 'external-module' {}, but NOTdeclare module './internal-module' {}) contained in files which should be inlined (all local files and packages from inlined libraries). [boolean] [default:false]--disable-symlinks-followingβ (EXPERIMENTAL) disables resolving of symlinks to the original path. seehttps://github.com/timocov/dts-bundle-generator/issues/39for more information. [boolean] [default:false]
ok so this one is marked EXPERIMENTAL, which in dev-speak means "we're trying stuff, be chill about it". π«Ά
--respect-preserve-const-enumβ enables stripping theconstkeyword from every direct-exported (or re-exported) from entry fileconst enum. seehttps://github.com/timocov/dts-bundle-generator/issues/110for more information. [boolean] [default:false]--export-referenced-typesβ by default all interfaces, types and const enums are marked as exported even if they aren't exported directly. this option lets you disable that behavior so a node will be exported if it is exported from root source file only. [boolean] [default:true]
heads up bestie: this one defaults to true, not false like basically everything else here. the way she's different π
--configβ file path to the generator config file. [string]--no-bannerβ allows remove "Generated by dts-bundle-generator" comment from the output. bye bye little banner. [boolean] [default:false] π--versionβ shows version number. [boolean] β
π¦ EXAMPLES π¦
look at her go, three whole ways to run it:
dts-bundle-generator path/to/your/entry-file.ts
dts-bundle-generator path/to/your/entry-file.ts
path/to/your/entry-file-2.ts
dts-bundle-generator --external-types jquery react -- entry-file.ts
that -- in the last one? iconic separator behavior, keep it. β¨
π SEE ALSO π
tsc(1)β go say hi to your local TypeScript compiler, they're friends.
and that's the page!! written by the fine folks behind dts-bundle-generator.js, version 9.5.1, dated March 2026. slay, no notes, go generate some bundles. ππβ¨
π¦ where this page comes from
- ubuntu stonking: node-dts-bundle-generator 9.5.1-3 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms