• Version 9.3.1
  • Published
  • 167 kB
  • 2 dependencies
  • MIT license


npm i dts-bundle-generator
yarn add dts-bundle-generator
pnpm add dts-bundle-generator


DTS Bundle Generator



function generateDtsBundle

generateDtsBundle: (
entries: readonly EntryPointConfig[],
options?: CompilationOptions
) => string[];


    interface CompilationOptions

    interface CompilationOptions {}
      followSymlinks?: boolean;
      • EXPERIMENTAL! Allows disable resolving of symlinks to the original path. By default following is enabled.

        See Also

        • https://github.com/timocov/dts-bundle-generator/issues/39

      property preferredConfigPath

      preferredConfigPath?: string;
      • Path to the tsconfig file that will be used for the compilation.

      interface EntryPointConfig

      interface EntryPointConfig {}

        property failOnClass

        failOnClass?: boolean;
        • Fail if generated dts contains class declaration.

        property filePath

        filePath: string;
        • Path to input file.

        property libraries

        libraries?: LibrariesOptions;

          property output

          output?: OutputOptions;

            interface LibrariesOptions

            interface LibrariesOptions {}

              property allowedTypesLibraries

              allowedTypesLibraries?: string[];
              • Array of package names from to import typings from via the triple-slash reference directive. By default all packages are allowed and will be used according to their usages.

              property importedLibraries

              importedLibraries?: string[];
              • 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).

              property inlinedLibraries

              inlinedLibraries?: string[];
              • Array of package names from node_modules to inline typings from. Used types will be inlined into the output file.

              interface OutputOptions

              interface OutputOptions {}

                property exportReferencedTypes

                exportReferencedTypes?: boolean;
                • 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.

                property inlineDeclareExternals

                inlineDeclareExternals?: boolean;
                • 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)

                property inlineDeclareGlobals

                inlineDeclareGlobals?: boolean;
                • Enables inlining of declare global statements contained in files which should be inlined (all local files and packages from inlined libraries).

                property noBanner

                noBanner?: boolean;
                • Allows remove "Generated by dts-bundle-generator" comment from the output

                property respectPreserveConstEnum

                respectPreserveConstEnum?: boolean;
                • Enables stripping the const keyword from every direct-exported (or re-exported) from entry file const enum. This allows you "avoid" the issue described in https://github.com/microsoft/TypeScript/issues/37774.

                property sortNodes

                sortNodes?: boolean;
                • Sort output nodes in ascendant order.

                property umdModuleName

                umdModuleName?: string;
                • Name of the UMD module. If specified then export as namespace ModuleName; will be emitted.

                Package Files (1)

                Dependencies (2)

                Dev Dependencies (0)

                No dev dependencies.

                Peer Dependencies (0)

                No peer dependencies.


                To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/dts-bundle-generator.

                • Markdown
                • HTML
                  <a href="https://www.jsdocs.io/package/dts-bundle-generator"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>