OptionalcjsOptionalcompilerOverride the compilerOptions specified in tsconfig.json.
OptionalcwdThe directory in which the plugin will search for the tsconfig.json file.
OptionaldtsSet to true if your entry files are .d.ts files instead of .ts files.
When enabled, the plugin will skip generating a .d.ts file for the entry point.
OptionalemitIf true, the plugin will emit only .d.ts files and remove all other output chunks.
This is especially useful when generating .d.ts files for the CommonJS format as part of a separate build step.
OptionalentryGlob pattern(s) to filter which entry files get .d.ts generation.
When specified, only entry files matching these patterns will emit .d.ts chunks.
When not specified, all entries get .d.ts generation.
Supports negation patterns (e.g., ['**', '!src/icons/**']) for exclusion.
Patterns are matched against file paths relative to cwd.
OptionalgeneratorThe generator used to produce .d.ts files.
'tsc': The TypeScript 5.x/6.x compiler. Supports all TypeScript features.'oxc': Oxc's isolated declaration generator. Much
faster than tsc, but only supports code that satisfies
isolatedDeclarations.'tsgo': [Experimental] The TypeScript Go compiler
(tsgo). May not support
all TypeScript features yet.When unset, the generator is inferred:
OptionalloggerOptionalresolverSpecifies a resolver to resolve type definitions, especially for node_modules.
'oxc': Uses Oxc's module resolution, which is faster and more efficient.'tsc': Uses TypeScript's native module resolution, which may be more compatible with complex setups, but slower.OptionalsideIndicates whether the generated .d.ts files have side effects.
true, Rolldown will treat the .d.ts files as having side effects during tree-shaking.false, Rolldown may consider the .d.ts files as side-effect-free, potentially removing them if they are not imported.OptionalsourcemapIf true, the plugin will generate declaration maps (.d.ts.map) for .d.ts files.
OptionaltsconfigThe path to the tsconfig.json file.
If set to false, the plugin will ignore any tsconfig.json file.
You can still specify compilerOptions directly in the options.
OptionaltsconfigPass a raw tsconfig.json object directly to the plugin.
Determines how the default export is emitted.
If set to
true, and you are only exporting a single item usingexport default ..., the output will useexport = ...instead of the standard ES module syntax. This is useful for compatibility with CommonJS. This only controls the output format and does not enable support for CommonJS-style.d.tsinput.