GeneratePluginConfig: {
    bundlePackageExports?: boolean;
    checkDefaultPath?: boolean;
    compilerOptions?: type_fest.TsConfigJson.CompilerOptions;
    conditionExports?: resolve_exports.Options;
    conditionImports?: resolve_exports.Options;
    dtsReplace?: Record<string, string>;
    filterTags?: string | Iterable<string> | false | null;
    importsExternal?: boolean | _typhonjs_build_test_rollup_plugin_pkg_imports.ImportsPluginOptions;
    importsResolve?: boolean | _typhonjs_build_test_rollup_plugin_pkg_imports.ImportsResolvePluginOptions;
    input?: string;
    logLevel?: "all" | "verbose" | "info" | "warn" | "error";
    output?: string;
    outputExt?: string;
    outputGraph?: string;
    outputGraphIndentation?: number;
    outputPostprocess?: string;
    postprocess?: Iterable<ProcessorFunction>;
    prependFiles?: Iterable<string>;
    prependString?: Iterable<string>;
    removePrivateStatic?: boolean;
    rollupExternal?: string | RegExp | (string | RegExp)[] | ((id, parentId, isResolved) => boolean);
    rollupOnwarn?: ((warning, defaultHandler) => void);
    rollupPaths?: Record<string, string> | ((id) => string);
    tsCheckJs?: boolean;
    tsDiagnosticExternal?: boolean;
    tsDiagnosticFilter?: ((diagnostic, message?) => boolean);
    tsDiagnosticLog?: boolean;
    tsFileWalk?: boolean;
    tsTransformers?: Iterable<ts__default.TransformerFactory<ts__default.Bundle | ts__default.SourceFile> | ts__default.CustomTransformerFactory>;
    tsconfig?: string;
}

Data used to generate the bundled TS declaration.

Type declaration

  • Optional bundlePackageExports?: boolean

    When true attempt to bundle types of top level exported packages. This is useful for re-bundling libraries.

  • Optional checkDefaultPath?: boolean

    When true and bundling top level package exports via bundlePackageExports check for index.d.ts in package root; this is off by default as usually this is indicative of and older package not updated for exports in package.json.

  • Optional compilerOptions?: type_fest.TsConfigJson.CompilerOptions

    Typescript compiler options. https://www.typescriptlang.org/tsconfig

  • Optional conditionExports?: resolve_exports.Options

    resolve.exports conditional options for package.json exports field type.

  • Optional conditionImports?: resolve_exports.Options

    resolve.exports conditional options for package.json imports field type.

  • Optional dtsReplace?: Record<string, string>

    Options for naive text replacement operating on the final bundled TS declaration file. The keys are converted into RegExp instances so may be a valid pattern to match.

  • Optional filterTags?: string | Iterable<string> | false | null

    By default, jsdocRemoveNodeByTags('internal') transformer is automatically added removing all AST nodes that have the @internal tag. To generate declarations with internal tags set to false / null / undefined.

  • Optional importsExternal?: boolean | _typhonjs_build_test_rollup_plugin_pkg_imports.ImportsPluginOptions

    When defined enables importsExternal from the @typhonjs-build-test/rollup-plugin-pkg-imports package.

  • Optional importsResolve?: boolean | _typhonjs_build_test_rollup_plugin_pkg_imports.ImportsResolvePluginOptions

    When defined enables importsResolve from the @typhonjs-build-test/rollup-plugin-pkg-imports package.

  • Optional input?: string

    The input entry ESM source path.

  • Optional logLevel?: "all" | "verbose" | "info" | "warn" | "error"

    Defines the logging level.

  • Optional output?: string

    The output file path for the bundled TS declarations.

  • Optional outputExt?: string

    The bundled output TS declaration file extension. Normally a complete output path is provided when using generateDTS, but this can be useful when using the Rollup plugin to change the extension as desired.

  • Optional outputGraph?: string

    Outputs the package dependency graph to the given file path. The graph JSON is suitable for use in various graph libraries like cytoscape / Svelte Flow / amongst others.

  • Optional outputGraphIndentation?: number

    When outputting the dependency graph use this indentation value for the JSON output.

  • Optional outputPostprocess?: string

    When postprocessing is configured this is a helpful debugging mechanism to output the postprocessed declarations to a separate file making it easier to compare the results of any additional processing. You must specify a valid filepath.

  • Optional postprocess?: Iterable<ProcessorFunction>

    An iterable list of postprocessing functions. Note: This is experimental!

  • Optional prependFiles?: Iterable<string>

    Directly prepend these files to the bundled output. The files are first attempted to be resolved relative to the entry point folder allowing a common configuration to be applied across multiple subpath exports. Then a second attempt is made with the path provided.

  • Optional prependString?: Iterable<string>

    Directly prepend these strings to the bundled output.

  • Optional removePrivateStatic?: boolean

    When true a custom transformer is added to remove the renaming of private static class members that Typescript currently renames.

  • Optional rollupExternal?: string | RegExp | (string | RegExp)[] | ((id, parentId, isResolved) => boolean)
  • Optional rollupOnwarn?: ((warning, defaultHandler) => void)
      • (warning, defaultHandler): void
      • Parameters

        • warning: rollup.RollupLog
        • defaultHandler: ((warning) => void)
            • (warning): void
            • Parameters

              • warning: string | rollup.RollupLog

              Returns void

        Returns void

  • Optional rollupPaths?: Record<string, string> | ((id) => string)
  • Optional tsCheckJs?: boolean

    When true set checkJs to default compiler options. This is a convenience parameter to quickly turn checkJs on / off.

  • Optional tsDiagnosticExternal?: boolean

    By default, all diagnostic errors that are external to the common root path from the input source file will be filtered from diagnostic logging. Set to true to include all diagnostic errors in logging. If you set an explicit diagnostic filter function via the tsDiagnosticFilter this option is ignored.

  • Optional tsDiagnosticFilter?: ((diagnostic, message?) => boolean)

    Optional filter function to handle diagnostic messages in a similar manner as the onwarn Rollup callback. Return true to filter the given diagnostic from posting to console.error otherwise return false to include.

      • (diagnostic, message?): boolean
      • Optional filter function to handle diagnostic messages in a similar manner as the onwarn Rollup callback. Return true to filter the given diagnostic from posting to console.error otherwise return false to include.

        Parameters

        • diagnostic: ts.Diagnostic
        • Optional message: string

        Returns boolean

  • Optional tsDiagnosticLog?: boolean

    When generating a DTS bundle you may opt to turn off any emitted TS compiler diagnostic messages.

  • Optional tsFileWalk?: boolean

    When true all TS files located at the input path and all subdirectories are included as synthetic exports in the generated declarations. Setting to false only includes TS files in the direct input path.

  • Optional tsTransformers?: Iterable<ts__default.TransformerFactory<ts__default.Bundle | ts__default.SourceFile> | ts__default.CustomTransformerFactory>

    A list of TransformerFactory or CustomTransformerFactory functions to process generated declaration AST while emitting intermediate types for bundling. https://github.com/itsdouges/typescript-transformer-handbook

  • Optional tsconfig?: string

    Provide a path to a tsconfig.json for compilerOptions configuration.