DTS-BUNDLE-GENERATOR.JS(1)

πŸ“¦ version 9.5.1, in ubuntu stonking

πŸ’– 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 generated d.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 generated d.ts file. 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 from node_modules to inline typings from. the used types get inlined right into the output file. [array]
  • --external-imports β€” array of package names from node_modules to import typings from. the used types will be imported using import { 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 @types to 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 then export as namespace ModuleName; will be emitted. [string] ✨
  • --project β€” path to the tsconfig.json file 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 of declare global statements contained in files which should be inlined (all local files and packages from --external-inlines). [boolean] [default: false]
  • --inline-declare-externals β€” enables inlining of declare module statements of the global modules (e.g. declare module 'external-module' {}, but NOT declare 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. see https://github.com/timocov/dts-bundle-generator/issues/39 for 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 the const keyword from every direct-exported (or re-exported) from entry file const enum. see https://github.com/timocov/dts-bundle-generator/issues/110 for 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