Scroll to navigation

DTS-BUNDLE-GENERATOR.JS(1) User Commands DTS-BUNDLE-GENERATOR.JS(1)

NAME

dts-bundle-generator.js - tool generating a .d.ts bundles from typescript code

SYNOPSIS

dts-bundle-generator [options] <file(s)>

OPTIONS

Show help
File name of generated d.ts
Enable verbose logging [default: false]
Disable any logging except errors [default: false]
Skip validation of generated d.ts file [default: false]
Fail if generated dts contains class declaration [default: false]
Array of package names from node_modules to inline typings from. Used types will be inlined into the output file [array]
Array of package names from node_modules to import typings from. 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]
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]
Name of the UMD module. If specified then `export as namespace ModuleName;` will be emitted [string]
Path to the tsconfig.json file that will be used for the compilation [string]
Sort output nodes [boolean] [default: false]
Enables inlining of `declare global` statements contained in files which should be inlined (all local files and packages from `--external-inlines`) [boolean] [default: false]
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]
(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]
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]
By default all interfaces, types and const enums are marked as exported even if they aren't exported directly. This option allows you to disable this behavior so a node will be exported if it is exported from root source file only. [boolean] [default: true]
File path to the generator config file [string]
Allows remove "Generated by dts-bundle-generator" comment from the output [boolean] [default: false]
Show version number [boolean]

EXAMPLES

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

SEE ALSO

tsc(1)

March 2026 dts-bundle-generator.js 9.5.1