@voidzero-dev/vite-plus-core 0.2.4 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/LICENSE +36 -120
  2. package/dist/rolldown/cli.d.mts +1 -1
  3. package/dist/rolldown/cli.mjs +11 -8
  4. package/dist/rolldown/config.d.mts +22 -10
  5. package/dist/rolldown/config.mjs +2 -2
  6. package/dist/rolldown/experimental-index.d.mts +164 -155
  7. package/dist/rolldown/experimental-index.mjs +23 -14
  8. package/dist/rolldown/experimental-runtime-types.d.ts +111 -41
  9. package/dist/rolldown/filter-index.d.mts +6 -5
  10. package/dist/rolldown/get-log-filter.d.mts +2 -2
  11. package/dist/rolldown/index.d.mts +4 -4
  12. package/dist/rolldown/index.mjs +10 -4
  13. package/dist/rolldown/parallel-plugin-worker.d.mts +1 -1
  14. package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
  15. package/dist/rolldown/parallel-plugin.d.mts +3 -4
  16. package/dist/rolldown/parse-ast-index.d.mts +19 -20
  17. package/dist/rolldown/parse-ast-index.mjs +2 -2
  18. package/dist/rolldown/plugins-index.d.mts +27 -28
  19. package/dist/rolldown/plugins-index.mjs +2 -2
  20. package/dist/rolldown/shared/{binding-B1q9aYT-.d.mts → binding-Dbbi0RbO.d.mts} +49 -25
  21. package/dist/rolldown/shared/{binding-BmkJW3Wy.mjs → binding-Dby9rwGk.mjs} +26 -26
  22. package/dist/rolldown/shared/{bindingify-input-options-Cmm60vfj.mjs → bindingify-input-options-DVQ4K-zY.mjs} +11 -13
  23. package/dist/rolldown/shared/{constructors-2i1T9YcF.d.mts → constructors-CSWbNgBZ.d.mts} +9 -10
  24. package/dist/rolldown/shared/{constructors-CE6zZSUt.mjs → constructors-CuGa75s-.mjs} +1 -1
  25. package/dist/rolldown/shared/define-config-B-IDOhDz.d.mts +4003 -0
  26. package/dist/rolldown/shared/dist-DX3cAjHx.mjs +154 -0
  27. package/dist/rolldown/shared/{error-BlQ0-ek7.mjs → error-DFGNOCle.mjs} +1 -1
  28. package/dist/rolldown/shared/get-log-filter-AjBknEEO.d.mts +34 -0
  29. package/dist/rolldown/shared/{load-config-CVVMWSlg.mjs → load-config-R0z2olkB.mjs} +19 -2
  30. package/dist/rolldown/shared/{logging-BSNejiLS.d.mts → logging-xuHO4mAy.d.mts} +6 -6
  31. package/dist/rolldown/shared/{logs-aMKUxRpj.mjs → logs-ZGEh6uhb.mjs} +6 -1
  32. package/dist/rolldown/shared/{normalize-string-or-regex-BYkbbGqQ.mjs → normalize-string-or-regex-SiXbePVH.mjs} +2 -2
  33. package/dist/rolldown/shared/{parse-Dphnedsw.mjs → parse-D5dkElpf.mjs} +2 -2
  34. package/dist/rolldown/shared/{prompt-Bgj-uEyc.mjs → prompt-pZFoa1TT.mjs} +59 -17
  35. package/dist/rolldown/shared/{resolve-tsconfig-CdIAR1Eb.mjs → resolve-tsconfig-2TXRF_zr.mjs} +2 -2
  36. package/dist/rolldown/shared/{rolldown-Bnp916iM.mjs → rolldown-BnV7isAX.mjs} +1 -1
  37. package/dist/rolldown/shared/{rolldown-build-Cs2iVJuw.mjs → rolldown-build-BGXNOfvH.mjs} +33 -13
  38. package/dist/rolldown/shared/transform-Cs2bUDRH.d.mts +148 -0
  39. package/dist/rolldown/shared/{watch-ECGr-_QS.mjs → watch-DVucf-VG.mjs} +5 -5
  40. package/dist/rolldown/utils-index.d.mts +29 -30
  41. package/dist/rolldown/utils-index.mjs +9 -9
  42. package/dist/tsdown/{build-B_nvJe4A-CvbtVBxy.js → build-oq13wECG-Bymq3jT5.js} +210 -1229
  43. package/dist/tsdown/debug-BntVTkRq-BGIoAiTa.js +159 -0
  44. package/dist/tsdown/{detect-B97OSl92-BJPZyIKJ.js → detect-DGhJGEqb-S-tkSzpt.js} +13 -2
  45. package/dist/tsdown/dist-CxIM8o7n.js +2613 -0
  46. package/dist/tsdown/dist-DCMiHFrJ.js +1061 -0
  47. package/dist/tsdown/index-types.d.ts +2106 -1895
  48. package/dist/tsdown/index.js +7 -4
  49. package/dist/tsdown/internal-C7ewSPAZ.js +3 -0
  50. package/dist/tsdown/load-tsc-BKULZsrs-BFmeD6Bu.js +18 -0
  51. package/dist/tsdown/{main-BlTcyuFi.js → main-BdzlWPt6.js} +214 -9
  52. package/dist/tsdown/npm_entry_picomatch.cjs +44 -15
  53. package/dist/tsdown/{resolver-DtsKFXi2-B8Z3WwZh.js → resolver-cwLsPb2o-oj1hqxK6.js} +4 -3
  54. package/dist/tsdown/run.js +4 -4
  55. package/dist/tsdown/{src-CISfE_A0.js → src-BV-UJr_R.js} +5 -5
  56. package/dist/tsdown/target-CNxIDvSz-eoHNdJNs.js +576 -0
  57. package/dist/tsdown/{tsc-context-CX_GXdyS.js → tsc-context-CA76SkkZ.js} +2 -2
  58. package/dist/tsdown/{tsc-CdZE7QwS.js → tsc-zcbB6ZVY.js} +58 -117
  59. package/dist/tsdown/tsdown-css.js +74 -23
  60. package/dist/tsdown/tsdown-exe.js +129 -876
  61. package/dist/vite/client/client.mjs +5 -5
  62. package/dist/vite/node/chunks/build.js +204 -94
  63. package/dist/vite/node/chunks/dist2.js +1 -1
  64. package/dist/vite/node/chunks/lib.js +1 -1
  65. package/dist/vite/node/chunks/moduleRunnerTransport.d.ts +25 -26
  66. package/dist/vite/node/chunks/node.js +552 -104
  67. package/dist/vite/node/chunks/postcss-import.js +11 -11
  68. package/dist/vite/node/cli.js +3 -4
  69. package/dist/vite/node/index.d.ts +1284 -1285
  70. package/dist/vite/node/index.js +1 -2
  71. package/dist/vite/node/module-runner.d.ts +76 -77
  72. package/dist/vite/node/module-runner.js +6 -7
  73. package/package.json +20 -18
  74. package/dist/rolldown/shared/define-config-BBz954-q.d.mts +0 -3901
  75. package/dist/rolldown/shared/get-log-filter-BpNVNJ5-.d.mts +0 -35
  76. package/dist/rolldown/shared/transform-CEmFsvJW.d.mts +0 -149
  77. package/dist/tsdown/debug-DLdR-9XB-DQZ6QLC0.js +0 -250
  78. package/dist/tsdown/dist-CZtGyfn3.js +0 -200
  79. package/dist/tsdown/dist-CqbVlnVq.js +0 -32057
  80. package/dist/tsdown/general-Cp4NiJNK-CbyrS9q1.js +0 -97
  81. package/dist/tsdown/internal-bfoxcI4F.js +0 -3
  82. package/dist/tsdown/npm_cjs_chunk_range.cjs +0 -474
  83. package/dist/tsdown/npm_cjs_chunk_semver.cjs +0 -357
  84. package/dist/tsdown/npm_entry_semver_functions_coerce.cjs +0 -52
  85. package/dist/tsdown/npm_entry_semver_functions_satisfies.cjs +0 -19
  86. package/dist/tsdown/npm_entry_semver_ranges_min-version.cjs +0 -46
  87. package/dist/tsdown/target-CqeSqtms-FAqYuGyB.js +0 -79
  88. package/dist/vite/node/chunks/logger.js +0 -361
@@ -4,553 +4,227 @@ import { StartOptions } from "@vitejs/devtools/cli-commands";
4
4
  import { CheckPackageOptions } from "@arethetypeswrong/core";
5
5
  import { Options } from "publint";
6
6
  import { TransformOptions } from "lightningcss";
7
+ import { FileExtensionInfo } from "typescript";
7
8
  import { IsolatedDeclarationsOptions } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
8
9
  import { Options as UnusedOptions } from "unplugin-unused";
9
-
10
- //#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_b3805a6765df28d505319221a7193e18/node_modules/tsdown/dist/index-C0LaRpVv.d.mts
11
- //#region src/utils/types.d.ts
12
- type Overwrite<T, U> = Omit<T, keyof U> & U;
13
- type Awaitable<T> = T | Promise<T>;
14
- type MarkPartial<T, K extends keyof T> = Omit<Required<T>, K> & Partial<Pick<T, K>>;
15
- type Arrayable<T> = T | T[]; //#endregion
16
- //#region src/utils/logger.d.ts
17
- type LogType = "error" | "warn" | "info";
18
- type LogLevel = LogType | "silent";
19
- interface LoggerOptions {
20
- allowClearScreen?: boolean;
21
- customLogger?: Logger;
22
- console?: Console;
23
- failOnWarn?: boolean;
10
+ //#region ../../node_modules/.pnpm/hookable@6.1.1/node_modules/hookable/dist/index.d.mts
11
+ type HookCallback = (...arguments_: any) => Promise<void> | void;
12
+ type HookKeys<T> = keyof T & string;
13
+ type DeprecatedHook<T> = {
14
+ message?: string;
15
+ to: HookKeys<T>;
16
+ };
17
+ type ValueOf<C> = C extends Record<any, any> ? C[keyof C] : never;
18
+ type Strings<T> = Exclude<keyof T, number | symbol>;
19
+ type KnownKeys<T> = keyof { [K in keyof T as string extends K ? never : number extends K ? never : K]: never; };
20
+ type StripGeneric<T> = Pick<T, KnownKeys<T> extends keyof T ? KnownKeys<T> : never>;
21
+ type OnlyGeneric<T> = Omit<T, KnownKeys<T> extends keyof T ? KnownKeys<T> : never>;
22
+ type Namespaces<T> = ValueOf<{ [key in Strings<T>]: key extends `${infer Namespace}:${string}` ? Namespace : never; }>;
23
+ type BareHooks<T> = ValueOf<{ [key in Strings<T>]: key extends `${string}:${string}` ? never : key; }>;
24
+ type HooksInNamespace<T, Namespace extends string> = ValueOf<{ [key in Strings<T>]: key extends `${Namespace}:${infer HookName}` ? HookName : never; }>;
25
+ type WithoutNamespace<T, Namespace extends string> = { [key in HooksInNamespace<T, Namespace>]: `${Namespace}:${key}` extends keyof T ? T[`${Namespace}:${key}`] : never; };
26
+ type NestedHooks<T> = (Partial<StripGeneric<T>> | Partial<OnlyGeneric<T>>) & Partial<{ [key in Namespaces<StripGeneric<T>>]: NestedHooks<WithoutNamespace<T, key>>; }> & Partial<{ [key in BareHooks<StripGeneric<T>>]: T[key]; }>;
27
+ type InferCallback<HT, HN extends keyof HT> = HT[HN] extends HookCallback ? HT[HN] : never;
28
+ type InferSpyEvent<HT extends Record<string, any>> = { [key in keyof HT]: {
29
+ name: key;
30
+ args: Parameters<HT[key]>;
31
+ context: Record<string, any>;
32
+ }; }[keyof HT];
33
+ declare class Hookable<HooksT extends Record<string, any> = Record<string, HookCallback>, HookNameT extends HookKeys<HooksT> = HookKeys<HooksT>> {
34
+ private _hooks;
35
+ private _before?;
36
+ private _after?;
37
+ private _deprecatedHooks;
38
+ private _deprecatedMessages?;
39
+ constructor();
40
+ hook<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>, options?: {
41
+ allowDeprecated?: boolean;
42
+ }): () => void;
43
+ hookOnce<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>): () => void;
44
+ removeHook<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>): void;
45
+ clearHook<NameT extends HookNameT>(name: NameT): void;
46
+ deprecateHook<NameT extends HookNameT>(name: NameT, deprecated: HookKeys<HooksT> | DeprecatedHook<HooksT>): void;
47
+ deprecateHooks(deprecatedHooks: Partial<Record<HookNameT, DeprecatedHook<HooksT>>>): void;
48
+ addHooks(configHooks: NestedHooks<HooksT>): () => void;
49
+ removeHooks(configHooks: NestedHooks<HooksT>): void;
50
+ removeAllHooks(): void;
51
+ callHook<NameT extends HookNameT>(name: NameT, ...args: Parameters<InferCallback<HooksT, NameT>>): Promise<any> | void;
52
+ callHookParallel<NameT extends HookNameT>(name: NameT, ...args: Parameters<InferCallback<HooksT, NameT>>): Promise<any[]> | void;
53
+ callHookWith<NameT extends HookNameT, CallFunction extends (hooks: HookCallback[], args: Parameters<InferCallback<HooksT, NameT>>, name: NameT) => any>(caller: CallFunction, name: NameT, args: Parameters<InferCallback<HooksT, NameT>>): ReturnType<CallFunction>;
54
+ beforeEach(function_: (event: InferSpyEvent<HooksT>) => void): () => void;
55
+ afterEach(function_: (event: InferSpyEvent<HooksT>) => void): () => void;
24
56
  }
25
- interface Logger {
26
- level: LogLevel;
27
- options?: LoggerOptions;
28
- info: (...args: any[]) => void;
29
- warn: (...args: any[]) => void;
30
- warnOnce: (...args: any[]) => void;
31
- error: (...args: any[]) => void;
32
- success: (...args: any[]) => void;
33
- clearScreen: (type: LogType) => void;
57
+ type CreateTask = (name?: string) => {
58
+ run: (function_: () => Promise<any> | any) => Promise<any> | any;
59
+ };
60
+ declare global {
61
+ interface Console {
62
+ createTask?: CreateTask;
63
+ }
34
64
  }
35
- declare const globalLogger: Logger; //#endregion
36
- //#region node_modules/.pnpm/pkg-types@2.3.1/node_modules/pkg-types/dist/index.d.mts
37
65
  //#endregion
38
- //#region src/packagejson/types.d.ts
39
- interface PackageJson {
40
- /**
41
- * The name is what your thing is called.
42
- * Some rules:
43
- * - The name must be less than or equal to 214 characters. This includes the scope for scoped packages.
44
- * - The name can’t start with a dot or an underscore.
45
- * - New packages must not have uppercase letters in the name.
46
- * - The name ends up being part of a URL, an argument on the command line, and a folder name. Therefore, the name can’t contain any non-URL-safe characters.
47
- */
48
- name?: string;
49
- /**
50
- * Version must be parseable by `node-semver`, which is bundled with npm as a dependency. (`npm install semver` to use it yourself.)
51
- */
52
- version?: string;
53
- /**
54
- * Put a description in it. It’s a string. This helps people discover your package, as it’s listed in `npm search`.
55
- */
56
- description?: string;
57
- /**
58
- * Put keywords in it. It’s an array of strings. This helps people discover your package as it’s listed in `npm search`.
59
- */
60
- keywords?: string[];
61
- /**
62
- * The url to the project homepage.
63
- */
64
- homepage?: string;
65
- /**
66
- * The url to your project’s issue tracker and / or the email address to which issues should be reported. These are helpful for people who encounter issues with your package.
67
- */
68
- bugs?: string | {
69
- url?: string;
70
- email?: string;
71
- };
72
- /**
73
- * You should specify a license for your package so that people know how they are permitted to use it, and any restrictions you’re placing on it.
74
- */
75
- license?: string;
76
- /**
77
- * Specify the place where your code lives. This is helpful for people who want to contribute. If the git repo is on GitHub, then the `npm docs` command will be able to find you.
78
- * For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same shortcut syntax you use for npm install:
79
- */
80
- repository?: string | {
81
- type: string;
82
- url: string;
83
- /**
84
- * If the `package.json` for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives:
85
- */
86
- directory?: string;
87
- };
88
- /**
89
- * The `scripts` field is a dictionary containing script commands that are run at various times in the lifecycle of your package.
90
- */
91
- scripts?: PackageJsonScripts;
92
- /**
93
- * If you set `"private": true` in your package.json, then npm will refuse to publish it.
94
- */
95
- private?: boolean;
96
- /**
97
- * The “author” is one person.
98
- */
99
- author?: PackageJsonPerson;
66
+ //#region ../../node_modules/.pnpm/@tsdown+exe@0.22.13_tsdown@0.22.13/node_modules/@tsdown/exe/dist/index.d.mts
67
+ //#region src/platform.d.ts
68
+ type ExePlatform = "win" | "darwin" | "linux";
69
+ type ExeArch = "x64" | "arm64";
70
+ interface ExeTarget {
71
+ platform: ExePlatform;
72
+ arch: ExeArch;
100
73
  /**
101
- * “contributors” is an array of people.
74
+ * Node.js version to use for the executable.
75
+ *
76
+ * Accepts a valid semver string (e.g., `"25.7.0"`), or the special values
77
+ * `"latest"` / `"latest-lts"` which resolve the version automatically from
78
+ * {@link https://nodejs.org/dist/index.json}.
79
+ *
80
+ * The minimum required version is 25.7.0, which is when ESM entry point
81
+ * support was added to Node.js SEA.
102
82
  */
103
- contributors?: PackageJsonPerson[];
83
+ nodeVersion: (string & {}) | "latest" | "latest-lts" | `${string}.${string}.${string}`;
84
+ }
85
+ interface ExeExtensionOptions {
104
86
  /**
105
- * An object containing a URL that provides up-to-date information
106
- * about ways to help fund development of your package,
107
- * a string URL, or an array of objects and string URLs
87
+ * Cross-platform targets for building executables.
88
+ * Requires `@tsdown/exe` to be installed.
89
+ * When specified, builds an executable for each target platform/arch combination.
90
+ *
91
+ * @example
92
+ * ```ts
93
+ * targets: [
94
+ * { platform: 'linux', arch: 'x64', nodeVersion: '25.7.0' },
95
+ * { platform: 'darwin', arch: 'arm64', nodeVersion: '25.7.0' },
96
+ * { platform: 'win', arch: 'x64', nodeVersion: '25.7.0' },
97
+ * ]
98
+ * ```
108
99
  */
109
- funding?: PackageJsonFunding | PackageJsonFunding[];
100
+ targets?: ExeTarget[];
101
+ getDownloadUrl?: (target: ExeTarget) => string | Promise<string>;
110
102
  /**
111
- * The optional `files` field is an array of file patterns that describes the entries to be included when your package is installed as a dependency. File patterns follow a similar syntax to `.gitignore`, but reversed: including a file, directory, or glob pattern (`*`, `**\/*`, and such) will make it so that file is included in the tarball when it’s packed. Omitting the field will make it default to `["*"]`, which means it will include all files.
103
+ * @default 'https://nodejs.org/dist/index.json'
112
104
  */
113
- files?: string[];
105
+ nodeDistIndexUrl?: string;
106
+ }
107
+ //#endregion
108
+ //#region ../../node_modules/.pnpm/@tsdown+css@0.22.13_jiti@2.7.0_postcss-import@16.1.1_postcss@8.5.20__postcss@8.5.20_sas_3e4d0025e048aeda9bd895926fc2faf1/node_modules/@tsdown/css/dist/index.d.mts
109
+ //#region src/options.d.ts
110
+ type LightningCSSOptions = Omit<TransformOptions<any>, "filename" | "code">;
111
+ interface CSSModulesOptions {
114
112
  /**
115
- * The main field is a module ID that is the primary entry point to your program. That is, if your package is named `foo`, and a user installs it, and then does `require("foo")`, then your main module’s exports object will be returned.
116
- * This should be a module ID relative to the root of your package folder.
117
- * For most modules, it makes the most sense to have a main script and often not much else.
113
+ * Controls the scoping behavior.
114
+ * @default 'local'
118
115
  */
119
- main?: string;
116
+ scopeBehaviour?: "global" | "local";
120
117
  /**
121
- * If your module is meant to be used client-side the browser field should be used instead of the main field. This is helpful to hint users that it might rely on primitives that aren’t available in Node.js modules. (e.g. window)
118
+ * File paths matching these patterns will use global scoping.
122
119
  */
123
- browser?: string | Record<string, string | false>;
120
+ globalModulePaths?: RegExp[];
124
121
  /**
125
- * The `unpkg` field is used to specify the URL to a UMD module for your package. This is used by default in the unpkg.com CDN service.
122
+ * Pattern or function to generate scoped class names.
123
+ * When using `transformer: 'lightningcss'`, only string patterns are supported.
126
124
  */
127
- unpkg?: string;
125
+ generateScopedName?: string | ((name: string, filename: string, css: string) => string);
128
126
  /**
129
- * A map of command name to local file name. On install, npm will symlink that file into `prefix/bin` for global installs, or `./node_modules/.bin/` for local installs.
127
+ * Prefix added to hashes when generating scoped names.
130
128
  */
131
- bin?: string | Record<string, string>;
129
+ hashPrefix?: string;
132
130
  /**
133
- * Specify either a single file or an array of filenames to put in place for the `man` program to find.
131
+ * Transform convention for exported class names.
134
132
  */
135
- man?: string | string[];
133
+ localsConvention?: "camelCase" | "camelCaseOnly" | "dashes" | "dashesOnly";
136
134
  /**
137
- * Dependencies are specified in a simple object that maps a package name to a version range. The version range is a string which has one or more space-separated descriptors. Dependencies can also be identified with a tarball or git URL.
135
+ * Whether to include global class names in the export.
138
136
  */
139
- dependencies?: Record<string, string>;
137
+ exportGlobals?: boolean;
140
138
  /**
141
- * If someone is planning on downloading and using your module in their program, then they probably don’t want or need to download and build the external test or documentation framework that you use.
142
- * In this case, it’s best to map these additional items in a `devDependencies` object.
139
+ * Callback to receive the generated class name mappings.
143
140
  */
144
- devDependencies?: Record<string, string>;
141
+ getJSON?: (cssFileName: string, json: Record<string, string>, outputFileName: string) => void;
142
+ }
143
+ interface CssOptions {
145
144
  /**
146
- * If a dependency can be used, but you would like npm to proceed if it cannot be found or fails to install, then you may put it in the `optionalDependencies` object. This is a map of package name to version or url, just like the `dependencies` object. The difference is that build failures do not cause installation to fail.
145
+ * Enable/disable CSS code splitting.
146
+ * When set to `false`, all CSS in the entire project will be extracted into
147
+ * a single CSS file named by {@linkcode fileName}.
148
+ * When set to `true`, CSS imported in async JS chunks will be preserved as chunks.
149
+ *
150
+ * Defaults to `false`, but if `unbundle` is `true`, it defaults to `true` to preserve chunk splitting.
147
151
  */
148
- optionalDependencies?: Record<string, string>;
152
+ splitting?: boolean;
149
153
  /**
150
- * In some cases, you want to express the compatibility of your package with a host tool or library, while not necessarily doing a `require` of this host. This is usually referred to as a plugin. Notably, your module may be exposing a specific interface, expected and specified by the host documentation.
154
+ * Specify the name of the CSS file generated when {@linkcode splitting} is
155
+ * `false`.
156
+ *
157
+ * @default 'style.css'
151
158
  */
152
- peerDependencies?: Record<string, string>;
159
+ fileName?: string;
153
160
  /**
154
- * TypeScript typings, typically ending by `.d.ts`.
161
+ * Set the target environment for CSS syntax lowering.
162
+ * Accepts esbuild-style target strings (e.g., `'chrome99'`, `'safari16.2'`).
163
+ * Defaults to the top-level `target` option.
164
+ *
165
+ * @see https://vite.dev/config/build-options#build-csstarget
166
+ * @default tsdownConfig.target
155
167
  */
156
- types?: string;
168
+ target?: string | string[] | false;
157
169
  /**
158
- * This field is synonymous with `types`.
170
+ * Options for CSS preprocessors (Sass/Less/Stylus).
171
+ *
172
+ * In addition to options specific to each processor, `additionalData` option
173
+ * can be used to inject extra code for each style content.
159
174
  */
160
- typings?: string;
175
+ preprocessorOptions?: PreprocessorOptions;
161
176
  /**
162
- * Non-Standard Node.js alternate entry-point to main.
163
- * An initial implementation for supporting CJS packages (from main), and use module for ESM modules.
177
+ * Enable/disable CSS minification.
178
+ *
179
+ * @default false
164
180
  */
165
- module?: string;
181
+ minify?: boolean;
166
182
  /**
167
- * Make main entry-point be loaded as an ESM module, support "export" syntax instead of "require"
168
- *
169
- * Docs:
170
- * - https://nodejs.org/docs/latest-v14.x/api/esm.html#esm_package_json_type_field
171
- *
172
- * @default 'commonjs'
173
- * @since Node.js v14
183
+ * Lightning CSS options for CSS syntax lowering and transformations.
174
184
  */
175
- type?: "module" | "commonjs";
185
+ lightningcss?: LightningCSSOptions;
176
186
  /**
177
- * Alternate and extensible alternative to "main" entry point.
187
+ * PostCSS configuration.
178
188
  *
179
- * When using `{type: "module"}`, any ESM module file MUST end with `.mjs` extension.
189
+ * - `string`: Path to the directory to search for PostCSS config files.
190
+ * - `object`: Inline PostCSS options with optional `plugins` array.
191
+ * - Omitted: Auto-detect PostCSS config from the project root.
180
192
  *
181
- * Docs:
182
- * - https://nodejs.org/docs/latest-v14.x/api/esm.html#esm_exports_sugar
193
+ * Only used when {@linkcode transformer} is `'postcss'`.
194
+ * Requires `postcss` to be installed.
183
195
  *
184
- * @since Node.js v12.7
196
+ * @see https://github.com/postcss/postcss
185
197
  */
186
- exports?: PackageJsonExports;
198
+ postcss?: PostCSSOptions;
187
199
  /**
188
- * Docs:
189
- * - https://nodejs.org/api/packages.html#imports
200
+ * When enabled, JS output preserves import statements pointing to emitted CSS files.
201
+ * Consumers of the library will automatically import the CSS alongside the JS.
202
+ *
203
+ * @default false
190
204
  */
191
- imports?: Record<string, string | Record<string, string>>;
205
+ inject?: boolean;
192
206
  /**
193
- * The field is used to define a set of sub-packages (or workspaces) within a monorepo.
207
+ * CSS modules configuration.
208
+ * When not `false`, `.module.css` files (and preprocessor variants) are
209
+ * treated as CSS modules with scoped class names.
194
210
  *
195
- * This field is an array of glob patterns or an object with specific configurations for managing
196
- * multiple packages in a single repository.
211
+ * @see https://github.com/css-modules/css-modules
212
+ *
213
+ * @default {}
197
214
  */
198
- workspaces?: string[] | {
199
- /**
200
- * Workspace package paths. Glob patterns are supported.
201
- */
202
- packages?: string[];
203
- /**
204
- * Packages to block from hoisting to the workspace root.
205
- * Uses glob patterns to match module paths in the dependency tree.
206
- *
207
- * Docs:
208
- * - https://classic.yarnpkg.com/blog/2018/02/15/nohoist/
209
- */
210
- nohoist?: string[];
211
- };
215
+ modules?: CSSModulesOptions | false;
212
216
  /**
213
- * The field is used to specify different TypeScript declaration files for
214
- * different versions of TypeScript, allowing for version-specific type definitions.
217
+ * CSS transformer to use. Controls how CSS is processed:
218
+ *
219
+ * - `'lightningcss'` (default): `@import` handled by Lightning CSS
220
+ * `bundleAsync()`, PostCSS is **not** used at all.
221
+ * - `'postcss'`: `@import` handled by `postcss-import`,
222
+ * PostCSS plugins applied, Lightning CSS used only for final
223
+ * targets/minify transform.
224
+ *
225
+ * @default 'lightningcss'
226
+ * @see https://vite.dev/config/shared-options#css-transformer
215
227
  */
216
- typesVersions?: Record<string, Record<string, string[]>>;
217
- /**
218
- * You can specify which operating systems your module will run on:
219
- * ```json
220
- * {
221
- * "os": ["darwin", "linux"]
222
- * }
223
- * ```
224
- * You can also block instead of allowing operating systems, just prepend the blocked os with a '!':
225
- * ```json
226
- * {
227
- * "os": ["!win32"]
228
- * }
229
- * ```
230
- * The host operating system is determined by `process.platform`
231
- * It is allowed to both block and allow an item, although there isn't any good reason to do this.
232
- */
233
- os?: string[];
234
- /**
235
- * If your code only runs on certain cpu architectures, you can specify which ones.
236
- * ```json
237
- * {
238
- * "cpu": ["x64", "ia32"]
239
- * }
240
- * ```
241
- * Like the `os` option, you can also block architectures:
242
- * ```json
243
- * {
244
- * "cpu": ["!arm", "!mips"]
245
- * }
246
- * ```
247
- * The host architecture is determined by `process.arch`
248
- */
249
- cpu?: string[];
250
- /**
251
- * This is a set of config values that will be used at publish-time.
252
- */
253
- publishConfig?: {
254
- /**
255
- * The registry that will be used if the package is published.
256
- */
257
- registry?: string;
258
- /**
259
- * The tag that will be used if the package is published.
260
- */
261
- tag?: string;
262
- /**
263
- * The access level that will be used if the package is published.
264
- */
265
- access?: "public" | "restricted";
266
- /**
267
- * **pnpm-only**
268
- *
269
- * By default, for portability reasons, no files except those listed in
270
- * the bin field will be marked as executable in the resulting package
271
- * archive. The executableFiles field lets you declare additional fields
272
- * that must have the executable flag (+x) set even if
273
- * they aren't directly accessible through the bin field.
274
- */
275
- executableFiles?: string[];
276
- /**
277
- * **pnpm-only**
278
- *
279
- * You also can use the field `publishConfig.directory` to customize
280
- * the published subdirectory relative to the current `package.json`.
281
- *
282
- * It is expected to have a modified version of the current package in
283
- * the specified directory (usually using third party build tools).
284
- */
285
- directory?: string;
286
- /**
287
- * **pnpm-only**
288
- *
289
- * When set to `true`, the project will be symlinked from the
290
- * `publishConfig.directory` location during local development.
291
- * @default true
292
- */
293
- linkDirectory?: boolean;
294
- } & Pick<PackageJson, "bin" | "main" | "exports" | "types" | "typings" | "module" | "browser" | "unpkg" | "typesVersions" | "os" | "cpu">;
295
- /**
296
- * See: https://nodejs.org/api/packages.html#packagemanager
297
- * This field defines which package manager is expected to be used when working on the current project.
298
- * Should be of the format: `<name>@<version>[#hash]`
299
- */
300
- packageManager?: string;
301
- [key: string]: any;
302
- }
303
- /**
304
- * See: https://docs.npmjs.com/cli/v11/using-npm/scripts#pre--post-scripts
305
- */
306
- type PackageJsonScriptWithPreAndPost<S extends string> = S | `${"pre" | "post"}${S}`;
307
- /**
308
- * See: https://docs.npmjs.com/cli/v11/using-npm/scripts#life-cycle-operation-order
309
- */
310
- type PackageJsonNpmLifeCycleScripts = "dependencies" | "prepublishOnly" | PackageJsonScriptWithPreAndPost<"install" | "pack" | "prepare" | "publish" | "restart" | "start" | "stop" | "test" | "version">;
311
- /**
312
- * See: https://pnpm.io/scripts#lifecycle-scripts
313
- */
314
- type PackageJsonPnpmLifeCycleScripts = "pnpm:devPreinstall";
315
- type PackageJsonCommonScripts = "build" | "coverage" | "deploy" | "dev" | "format" | "lint" | "preview" | "release" | "typecheck" | "watch";
316
- type PackageJsonScriptName = PackageJsonCommonScripts | PackageJsonNpmLifeCycleScripts | PackageJsonPnpmLifeCycleScripts | (string & {});
317
- type PackageJsonScripts = { [P in PackageJsonScriptName]?: string };
318
- /**
319
- * A “person” is an object with a “name” field and optionally “url” and “email”. Or you can shorten that all into a single string, and npm will parse it for you.
320
- */
321
- type PackageJsonPerson = string | {
322
- name: string;
323
- email?: string;
324
- url?: string;
325
- };
326
- type PackageJsonFunding = string | {
327
- url: string;
328
- type?: string;
329
- };
330
- type PackageJsonExportKey = "." | "import" | "require" | "types" | "node" | "browser" | "default" | (string & {});
331
- type PackageJsonExportsObject = { [P in PackageJsonExportKey]?: string | PackageJsonExportsObject | Array<string | PackageJsonExportsObject> };
332
- type PackageJsonExports = string | PackageJsonExportsObject | Array<string | PackageJsonExportsObject>; //#endregion
333
- //#region src/packagejson/utils.d.ts
334
- /**
335
- * Defines a PackageJson structure.
336
- * @param pkg - The `package.json` content as an object. See {@link PackageJson}.
337
- * @returns the same `package.json` object.
338
- */
339
- //#endregion
340
- //#endregion
341
- //#region ../../node_modules/.pnpm/hookable@6.1.1/node_modules/hookable/dist/index.d.mts
342
- type HookCallback = (...arguments_: any) => Promise<void> | void;
343
- type HookKeys<T> = keyof T & string;
344
- type DeprecatedHook<T> = {
345
- message?: string;
346
- to: HookKeys<T>;
347
- };
348
- type ValueOf<C> = C extends Record<any, any> ? C[keyof C] : never;
349
- type Strings<T> = Exclude<keyof T, number | symbol>;
350
- type KnownKeys<T> = keyof { [K in keyof T as string extends K ? never : number extends K ? never : K]: never };
351
- type StripGeneric<T> = Pick<T, KnownKeys<T> extends keyof T ? KnownKeys<T> : never>;
352
- type OnlyGeneric<T> = Omit<T, KnownKeys<T> extends keyof T ? KnownKeys<T> : never>;
353
- type Namespaces<T> = ValueOf<{ [key in Strings<T>]: key extends `${infer Namespace}:${string}` ? Namespace : never }>;
354
- type BareHooks<T> = ValueOf<{ [key in Strings<T>]: key extends `${string}:${string}` ? never : key }>;
355
- type HooksInNamespace<T, Namespace extends string> = ValueOf<{ [key in Strings<T>]: key extends `${Namespace}:${infer HookName}` ? HookName : never }>;
356
- type WithoutNamespace<T, Namespace extends string> = { [key in HooksInNamespace<T, Namespace>]: `${Namespace}:${key}` extends keyof T ? T[`${Namespace}:${key}`] : never };
357
- type NestedHooks<T> = (Partial<StripGeneric<T>> | Partial<OnlyGeneric<T>>) & Partial<{ [key in Namespaces<StripGeneric<T>>]: NestedHooks<WithoutNamespace<T, key>> }> & Partial<{ [key in BareHooks<StripGeneric<T>>]: T[key] }>;
358
- type InferCallback<HT, HN extends keyof HT> = HT[HN] extends HookCallback ? HT[HN] : never;
359
- type InferSpyEvent<HT extends Record<string, any>> = { [key in keyof HT]: {
360
- name: key;
361
- args: Parameters<HT[key]>;
362
- context: Record<string, any>;
363
- } }[keyof HT];
364
- declare class Hookable<HooksT extends Record<string, any> = Record<string, HookCallback>, HookNameT extends HookKeys<HooksT> = HookKeys<HooksT>> {
365
- private _hooks;
366
- private _before?;
367
- private _after?;
368
- private _deprecatedHooks;
369
- private _deprecatedMessages?;
370
- constructor();
371
- hook<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>, options?: {
372
- allowDeprecated?: boolean;
373
- }): () => void;
374
- hookOnce<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>): () => void;
375
- removeHook<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>): void;
376
- clearHook<NameT extends HookNameT>(name: NameT): void;
377
- deprecateHook<NameT extends HookNameT>(name: NameT, deprecated: HookKeys<HooksT> | DeprecatedHook<HooksT>): void;
378
- deprecateHooks(deprecatedHooks: Partial<Record<HookNameT, DeprecatedHook<HooksT>>>): void;
379
- addHooks(configHooks: NestedHooks<HooksT>): () => void;
380
- removeHooks(configHooks: NestedHooks<HooksT>): void;
381
- removeAllHooks(): void;
382
- callHook<NameT extends HookNameT>(name: NameT, ...args: Parameters<InferCallback<HooksT, NameT>>): Promise<any> | void;
383
- callHookParallel<NameT extends HookNameT>(name: NameT, ...args: Parameters<InferCallback<HooksT, NameT>>): Promise<any[]> | void;
384
- callHookWith<NameT extends HookNameT, CallFunction extends (hooks: HookCallback[], args: Parameters<InferCallback<HooksT, NameT>>, name: NameT) => any>(caller: CallFunction, name: NameT, args: Parameters<InferCallback<HooksT, NameT>>): ReturnType<CallFunction>;
385
- beforeEach(function_: (event: InferSpyEvent<HooksT>) => void): () => void;
386
- afterEach(function_: (event: InferSpyEvent<HooksT>) => void): () => void;
387
- }
388
- type CreateTask = (name?: string) => {
389
- run: (function_: () => Promise<any> | any) => Promise<any> | any;
390
- };
391
- declare global {
392
- interface Console {
393
- createTask?: CreateTask;
394
- }
395
- }
396
- /** @deprecated */
397
- //#endregion
398
- //#region ../../node_modules/.pnpm/@tsdown+exe@0.22.3_tsdown@0.22.3/node_modules/@tsdown/exe/dist/index.d.mts
399
- //#region src/platform.d.ts
400
- type ExePlatform = "win" | "darwin" | "linux";
401
- type ExeArch = "x64" | "arm64";
402
- interface ExeTarget {
403
- platform: ExePlatform;
404
- arch: ExeArch;
405
- /**
406
- * Node.js version to use for the executable.
407
- *
408
- * Accepts a valid semver string (e.g., `"25.7.0"`), or the special values
409
- * `"latest"` / `"latest-lts"` which resolve the version automatically from
410
- * {@link https://nodejs.org/dist/index.json}.
411
- *
412
- * The minimum required version is 25.7.0, which is when SEA support was added to Node.js.
413
- */
414
- nodeVersion: (string & {}) | "latest" | "latest-lts" | `${string}.${string}.${string}`;
415
- }
416
- interface ExeExtensionOptions {
417
- /**
418
- * Cross-platform targets for building executables.
419
- * Requires `@tsdown/exe` to be installed.
420
- * When specified, builds an executable for each target platform/arch combination.
421
- *
422
- * @example
423
- * ```ts
424
- * targets: [
425
- * { platform: 'linux', arch: 'x64', nodeVersion: '25.7.0' },
426
- * { platform: 'darwin', arch: 'arm64', nodeVersion: '25.7.0' },
427
- * { platform: 'win', arch: 'x64', nodeVersion: '25.7.0' },
428
- * ]
429
- * ```
430
- */
431
- targets?: ExeTarget[];
432
- }
433
- //#endregion
434
- //#region ../../node_modules/.pnpm/@tsdown+css@0.22.3_jiti@2.7.0_postcss-import@16.1.1_postcss@8.5.16__postcss-modules@6.0_8815f8f9084693f5f3ebee14fa13c42a/node_modules/@tsdown/css/dist/index.d.mts
435
- //#region src/options.d.ts
436
- type LightningCSSOptions = Omit<TransformOptions<any>, "filename" | "code">;
437
- interface CSSModulesOptions {
438
- /**
439
- * Controls the scoping behavior.
440
- * @default 'local'
441
- */
442
- scopeBehaviour?: "global" | "local";
443
- /**
444
- * File paths matching these patterns will use global scoping.
445
- */
446
- globalModulePaths?: RegExp[];
447
- /**
448
- * Pattern or function to generate scoped class names.
449
- * When using `transformer: 'lightningcss'`, only string patterns are supported.
450
- */
451
- generateScopedName?: string | ((name: string, filename: string, css: string) => string);
452
- /**
453
- * Prefix added to hashes when generating scoped names.
454
- */
455
- hashPrefix?: string;
456
- /**
457
- * Transform convention for exported class names.
458
- */
459
- localsConvention?: "camelCase" | "camelCaseOnly" | "dashes" | "dashesOnly";
460
- /**
461
- * Whether to include global class names in the export.
462
- */
463
- exportGlobals?: boolean;
464
- /**
465
- * Callback to receive the generated class name mappings.
466
- */
467
- getJSON?: (cssFileName: string, json: Record<string, string>, outputFileName: string) => void;
468
- }
469
- interface CssOptions {
470
- /**
471
- * Enable/disable CSS code splitting.
472
- * When set to `false`, all CSS in the entire project will be extracted into
473
- * a single CSS file named by {@linkcode fileName}.
474
- * When set to `true`, CSS imported in async JS chunks will be preserved as chunks.
475
- *
476
- * Defaults to `false`, but if `unbundle` is `true`, it defaults to `true` to preserve chunk splitting.
477
- */
478
- splitting?: boolean;
479
- /**
480
- * Specify the name of the CSS file generated when {@linkcode splitting} is
481
- * `false`.
482
- *
483
- * @default 'style.css'
484
- */
485
- fileName?: string;
486
- /**
487
- * Set the target environment for CSS syntax lowering.
488
- * Accepts esbuild-style target strings (e.g., `'chrome99'`, `'safari16.2'`).
489
- * Defaults to the top-level `target` option.
490
- *
491
- * @see https://vite.dev/config/build-options#build-csstarget
492
- * @default tsdownConfig.target
493
- */
494
- target?: string | string[] | false;
495
- /**
496
- * Options for CSS preprocessors (Sass/Less/Stylus).
497
- *
498
- * In addition to options specific to each processor, `additionalData` option
499
- * can be used to inject extra code for each style content.
500
- */
501
- preprocessorOptions?: PreprocessorOptions;
502
- /**
503
- * Enable/disable CSS minification.
504
- *
505
- * @default false
506
- */
507
- minify?: boolean;
508
- /**
509
- * Lightning CSS options for CSS syntax lowering and transformations.
510
- */
511
- lightningcss?: LightningCSSOptions;
512
- /**
513
- * PostCSS configuration.
514
- *
515
- * - `string`: Path to the directory to search for PostCSS config files.
516
- * - `object`: Inline PostCSS options with optional `plugins` array.
517
- * - Omitted: Auto-detect PostCSS config from the project root.
518
- *
519
- * Only used when {@linkcode transformer} is `'postcss'`.
520
- * Requires `postcss` to be installed.
521
- *
522
- * @see https://github.com/postcss/postcss
523
- */
524
- postcss?: PostCSSOptions;
525
- /**
526
- * When enabled, JS output preserves import statements pointing to emitted CSS files.
527
- * Consumers of the library will automatically import the CSS alongside the JS.
528
- *
529
- * @default false
530
- */
531
- inject?: boolean;
532
- /**
533
- * CSS modules configuration.
534
- * When not `false`, `.module.css` files (and preprocessor variants) are
535
- * treated as CSS modules with scoped class names.
536
- *
537
- * @see https://github.com/css-modules/css-modules
538
- *
539
- * @default {}
540
- */
541
- modules?: CSSModulesOptions | false;
542
- /**
543
- * CSS transformer to use. Controls how CSS is processed:
544
- *
545
- * - `'lightningcss'` (default): `@import` handled by Lightning CSS
546
- * `bundleAsync()`, PostCSS is **not** used at all.
547
- * - `'postcss'`: `@import` handled by `postcss-import`,
548
- * PostCSS plugins applied, Lightning CSS used only for final
549
- * targets/minify transform.
550
- *
551
- * @default 'lightningcss'
552
- * @see https://vite.dev/config/shared-options#css-transformer
553
- */
554
228
  transformer?: "postcss" | "lightningcss";
555
229
  }
556
230
  type PostCSSOptions = string | (Record<string, any> & {
@@ -586,632 +260,751 @@ interface StylusPreprocessorOptions {
586
260
  [key: string]: any;
587
261
  }
588
262
  //#endregion
263
+ //#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.27.12_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolve_d94a4da753642eee691447f5bf042e95/node_modules/rolldown-plugin-dts/dist/volar-ynbQeQZt.d.mts
264
+ //#region src/volar.d.ts
265
+ interface VolarPlugin {
266
+ extensionPatterns: RegExp[];
267
+ tsFileExtensionInfos: FileExtensionInfo[];
268
+ volarTypeScript: typeof import("@volar/typescript");
269
+ create: Parameters<(typeof import("@volar/typescript"))["proxyCreateProgram"]>[2];
270
+ toTsFilename?: (id: string) => string;
271
+ }
272
+ //#endregion
589
273
  //#region ../../node_modules/.pnpm/get-tsconfig@5.0.0-beta.5/node_modules/get-tsconfig/dist/index.d.mts
590
274
  declare namespace TsConfigJson {
591
275
  namespace CompilerOptions {
592
276
  type JSX = 'preserve' | 'react' | 'react-jsx' | 'react-jsxdev' | 'react-native';
593
- type Module = 'CommonJS' | 'AMD' | 'System' | 'UMD' | 'ES6' | 'ES2015' | 'ES2020' | 'ES2022' | 'ESNext' | 'Node16' | 'Node18' | 'Node20' | 'NodeNext' | 'Preserve' | 'None' // Lowercase alternatives
594
- | 'commonjs' | 'amd' | 'system' | 'umd' | 'es6' | 'es2015' | 'es2020' | 'es2022' | 'esnext' | 'node16' | 'node18' | 'node20' | 'nodenext' | 'preserve' | 'none';
595
- type NewLine = 'CRLF' | 'LF' // Lowercase alternatives
596
- | 'crlf' | 'lf';
597
- type Target = 'ES3' | 'ES5' | 'ES6' | 'ES2015' | 'ES2016' | 'ES2017' | 'ES2018' | 'ES2019' | 'ES2020' | 'ES2021' | 'ES2022' | 'ES2023' | 'ES2024' | 'ESNext' // Lowercase alternatives
598
- | 'es3' | 'es5' | 'es6' | 'es2015' | 'es2016' | 'es2017' | 'es2018' | 'es2019' | 'es2020' | 'es2021' | 'es2022' | 'es2023' | 'es2024' | 'esnext';
599
- type Lib = 'ES5' | 'ES6' | 'ES7' | 'ES2015' | 'ES2015.Collection' | 'ES2015.Core' | 'ES2015.Generator' | 'ES2015.Iterable' | 'ES2015.Promise' | 'ES2015.Proxy' | 'ES2015.Reflect' | 'ES2015.Symbol.WellKnown' | 'ES2015.Symbol' | 'ES2016' | 'ES2016.Array.Include' | 'ES2017' | 'ES2017.ArrayBuffer' | 'ES2017.Date' | 'ES2017.Intl' | 'ES2017.Object' | 'ES2017.SharedMemory' | 'ES2017.String' | 'ES2017.TypedArrays' | 'ES2018' | 'ES2018.AsyncGenerator' | 'ES2018.AsyncIterable' | 'ES2018.Intl' | 'ES2018.Promise' | 'ES2018.Regexp' | 'ES2019' | 'ES2019.Array' | 'ES2019.Intl' | 'ES2019.Object' | 'ES2019.String' | 'ES2019.Symbol' | 'ES2020' | 'ES2020.BigInt' | 'ES2020.Date' | 'ES2020.Intl' | 'ES2020.Number' | 'ES2020.Promise' | 'ES2020.SharedMemory' | 'ES2020.String' | 'ES2020.Symbol.WellKnown' | 'ES2021' | 'ES2021.Intl' | 'ES2021.Promise' | 'ES2021.String' | 'ES2021.WeakRef' | 'ES2022' | 'ES2022.Array' | 'ES2022.Error' | 'ES2022.Intl' | 'ES2022.Object' | 'ES2022.RegExp' | 'ES2022.SharedMemory' | 'ES2022.String' | 'ES2023' | 'ES2023.Array' | 'ES2023.Collection' | 'ES2023.Intl' | 'ES2024' | 'ES2024.ArrayBuffer' | 'ES2024.Collection' | 'ES2024.Object' | 'ES2024.Promise' | 'ES2024.Regexp' | 'ES2024.SharedMemory' | 'ES2024.String' | 'ESNext' | 'ESNext.Array' | 'ESNext.AsyncIterable' | 'ESNext.BigInt' | 'ESNext.Collection' | 'ESNext.Decorators' | 'ESNext.Disposable' | 'ESNext.Error' | 'ESNext.Intl' | 'ESNext.Iterator' | 'ESNext.Object' | 'ESNext.Promise' | 'ESNext.Regexp' | 'ESNext.String' | 'ESNext.Symbol' | 'ESNext.WeakRef' | 'DOM' | 'DOM.AsyncIterable' | 'DOM.Iterable' | 'Decorators' | 'Decorators.Legacy' | 'ScriptHost' | 'WebWorker' | 'WebWorker.AsyncIterable' | 'WebWorker.ImportScripts' | 'WebWorker.Iterable' // Lowercase alternatives
600
- | 'es5' | 'es6' | 'es7' | 'es2015' | 'es2015.collection' | 'es2015.core' | 'es2015.generator' | 'es2015.iterable' | 'es2015.promise' | 'es2015.proxy' | 'es2015.reflect' | 'es2015.symbol.wellknown' | 'es2015.symbol' | 'es2016' | 'es2016.array.include' | 'es2017' | 'es2017.arraybuffer' | 'es2017.date' | 'es2017.intl' | 'es2017.object' | 'es2017.sharedmemory' | 'es2017.string' | 'es2017.typedarrays' | 'es2018' | 'es2018.asyncgenerator' | 'es2018.asynciterable' | 'es2018.intl' | 'es2018.promise' | 'es2018.regexp' | 'es2019' | 'es2019.array' | 'es2019.intl' | 'es2019.object' | 'es2019.string' | 'es2019.symbol' | 'es2020' | 'es2020.bigint' | 'es2020.date' | 'es2020.intl' | 'es2020.number' | 'es2020.promise' | 'es2020.sharedmemory' | 'es2020.string' | 'es2020.symbol.wellknown' | 'es2021' | 'es2021.intl' | 'es2021.promise' | 'es2021.string' | 'es2021.weakref' | 'es2022' | 'es2022.array' | 'es2022.error' | 'es2022.intl' | 'es2022.object' | 'es2022.regexp' | 'es2022.sharedmemory' | 'es2022.string' | 'es2023' | 'es2023.array' | 'es2023.collection' | 'es2023.intl' | 'es2024' | 'es2024.arraybuffer' | 'es2024.collection' | 'es2024.object' | 'es2024.promise' | 'es2024.regexp' | 'es2024.sharedmemory' | 'es2024.string' | 'esnext' | 'esnext.array' | 'esnext.asynciterable' | 'esnext.bigint' | 'esnext.collection' | 'esnext.decorators' | 'esnext.disposable' | 'esnext.error' | 'esnext.intl' | 'esnext.iterator' | 'esnext.object' | 'esnext.promise' | 'esnext.regexp' | 'esnext.string' | 'esnext.symbol' | 'esnext.weakref' | 'dom' | 'dom.asynciterable' | 'dom.iterable' | 'decorators' | 'decorators.legacy' | 'scripthost' | 'webworker' | 'webworker.asynciterable' | 'webworker.importscripts' | 'webworker.iterable';
277
+ type Module = 'CommonJS' | 'AMD' | 'System' | 'UMD' | 'ES6' | 'ES2015' | 'ES2020' | 'ES2022' | 'ESNext' | 'Node16' | 'Node18' | 'Node20' | 'NodeNext' | 'Preserve' | 'None' |
278
+ // Lowercase alternatives
279
+ 'commonjs' | 'amd' | 'system' | 'umd' | 'es6' | 'es2015' | 'es2020' | 'es2022' | 'esnext' | 'node16' | 'node18' | 'node20' | 'nodenext' | 'preserve' | 'none';
280
+ type NewLine = 'CRLF' | 'LF' |
281
+ // Lowercase alternatives
282
+ 'crlf' | 'lf';
283
+ type Target = 'ES3' | 'ES5' | 'ES6' | 'ES2015' | 'ES2016' | 'ES2017' | 'ES2018' | 'ES2019' | 'ES2020' | 'ES2021' | 'ES2022' | 'ES2023' | 'ES2024' | 'ESNext' |
284
+ // Lowercase alternatives
285
+ 'es3' | 'es5' | 'es6' | 'es2015' | 'es2016' | 'es2017' | 'es2018' | 'es2019' | 'es2020' | 'es2021' | 'es2022' | 'es2023' | 'es2024' | 'esnext';
286
+ type Lib = 'ES5' | 'ES6' | 'ES7' | 'ES2015' | 'ES2015.Collection' | 'ES2015.Core' | 'ES2015.Generator' | 'ES2015.Iterable' | 'ES2015.Promise' | 'ES2015.Proxy' | 'ES2015.Reflect' | 'ES2015.Symbol.WellKnown' | 'ES2015.Symbol' | 'ES2016' | 'ES2016.Array.Include' | 'ES2017' | 'ES2017.ArrayBuffer' | 'ES2017.Date' | 'ES2017.Intl' | 'ES2017.Object' | 'ES2017.SharedMemory' | 'ES2017.String' | 'ES2017.TypedArrays' | 'ES2018' | 'ES2018.AsyncGenerator' | 'ES2018.AsyncIterable' | 'ES2018.Intl' | 'ES2018.Promise' | 'ES2018.Regexp' | 'ES2019' | 'ES2019.Array' | 'ES2019.Intl' | 'ES2019.Object' | 'ES2019.String' | 'ES2019.Symbol' | 'ES2020' | 'ES2020.BigInt' | 'ES2020.Date' | 'ES2020.Intl' | 'ES2020.Number' | 'ES2020.Promise' | 'ES2020.SharedMemory' | 'ES2020.String' | 'ES2020.Symbol.WellKnown' | 'ES2021' | 'ES2021.Intl' | 'ES2021.Promise' | 'ES2021.String' | 'ES2021.WeakRef' | 'ES2022' | 'ES2022.Array' | 'ES2022.Error' | 'ES2022.Intl' | 'ES2022.Object' | 'ES2022.RegExp' | 'ES2022.SharedMemory' | 'ES2022.String' | 'ES2023' | 'ES2023.Array' | 'ES2023.Collection' | 'ES2023.Intl' | 'ES2024' | 'ES2024.ArrayBuffer' | 'ES2024.Collection' | 'ES2024.Object' | 'ES2024.Promise' | 'ES2024.Regexp' | 'ES2024.SharedMemory' | 'ES2024.String' | 'ESNext' | 'ESNext.Array' | 'ESNext.AsyncIterable' | 'ESNext.BigInt' | 'ESNext.Collection' | 'ESNext.Decorators' | 'ESNext.Disposable' | 'ESNext.Error' | 'ESNext.Intl' | 'ESNext.Iterator' | 'ESNext.Object' | 'ESNext.Promise' | 'ESNext.Regexp' | 'ESNext.String' | 'ESNext.Symbol' | 'ESNext.WeakRef' | 'DOM' | 'DOM.AsyncIterable' | 'DOM.Iterable' | 'Decorators' | 'Decorators.Legacy' | 'ScriptHost' | 'WebWorker' | 'WebWorker.AsyncIterable' | 'WebWorker.ImportScripts' | 'WebWorker.Iterable' |
287
+ // Lowercase alternatives
288
+ 'es5' | 'es6' | 'es7' | 'es2015' | 'es2015.collection' | 'es2015.core' | 'es2015.generator' | 'es2015.iterable' | 'es2015.promise' | 'es2015.proxy' | 'es2015.reflect' | 'es2015.symbol.wellknown' | 'es2015.symbol' | 'es2016' | 'es2016.array.include' | 'es2017' | 'es2017.arraybuffer' | 'es2017.date' | 'es2017.intl' | 'es2017.object' | 'es2017.sharedmemory' | 'es2017.string' | 'es2017.typedarrays' | 'es2018' | 'es2018.asyncgenerator' | 'es2018.asynciterable' | 'es2018.intl' | 'es2018.promise' | 'es2018.regexp' | 'es2019' | 'es2019.array' | 'es2019.intl' | 'es2019.object' | 'es2019.string' | 'es2019.symbol' | 'es2020' | 'es2020.bigint' | 'es2020.date' | 'es2020.intl' | 'es2020.number' | 'es2020.promise' | 'es2020.sharedmemory' | 'es2020.string' | 'es2020.symbol.wellknown' | 'es2021' | 'es2021.intl' | 'es2021.promise' | 'es2021.string' | 'es2021.weakref' | 'es2022' | 'es2022.array' | 'es2022.error' | 'es2022.intl' | 'es2022.object' | 'es2022.regexp' | 'es2022.sharedmemory' | 'es2022.string' | 'es2023' | 'es2023.array' | 'es2023.collection' | 'es2023.intl' | 'es2024' | 'es2024.arraybuffer' | 'es2024.collection' | 'es2024.object' | 'es2024.promise' | 'es2024.regexp' | 'es2024.sharedmemory' | 'es2024.string' | 'esnext' | 'esnext.array' | 'esnext.asynciterable' | 'esnext.bigint' | 'esnext.collection' | 'esnext.decorators' | 'esnext.disposable' | 'esnext.error' | 'esnext.intl' | 'esnext.iterator' | 'esnext.object' | 'esnext.promise' | 'esnext.regexp' | 'esnext.string' | 'esnext.symbol' | 'esnext.weakref' | 'dom' | 'dom.asynciterable' | 'dom.iterable' | 'decorators' | 'decorators.legacy' | 'scripthost' | 'webworker' | 'webworker.asynciterable' | 'webworker.importscripts' | 'webworker.iterable';
601
289
  type Plugin = {
602
290
  /**
603
- Plugin name.
604
- */
291
+ Plugin name.
292
+ */
605
293
  name: string;
606
294
  };
607
295
  type ImportsNotUsedAsValues = 'remove' | 'preserve' | 'error';
608
296
  type FallbackPolling = 'fixedPollingInterval' | 'priorityPollingInterval' | 'dynamicPriorityPolling' | 'fixedInterval' | 'priorityInterval' | 'dynamicPriority' | 'fixedChunkSize';
609
297
  type WatchDirectory = 'useFsEvents' | 'fixedPollingInterval' | 'dynamicPriorityPolling' | 'fixedChunkSizePolling';
610
298
  type WatchFile = 'fixedPollingInterval' | 'priorityPollingInterval' | 'dynamicPriorityPolling' | 'useFsEvents' | 'useFsEventsOnParentDirectory' | 'fixedChunkSizePolling';
611
- type ModuleResolution = 'classic' | 'node' | 'node10' | 'node16' | 'nodenext' | 'bundler' // Pascal-cased alternatives
612
- | 'Classic' | 'Node' | 'Node10' | 'Node16' | 'NodeNext' | 'Bundler';
299
+ type ModuleResolution = 'classic' | 'node' | 'node10' | 'node16' | 'nodenext' | 'bundler' |
300
+ // Pascal-cased alternatives
301
+ 'Classic' | 'Node' | 'Node10' | 'Node16' | 'NodeNext' | 'Bundler';
613
302
  type ModuleDetection = 'auto' | 'legacy' | 'force';
614
303
  type IgnoreDeprecations = '5.0';
615
304
  }
616
305
  type CompilerOptions = {
617
306
  /**
618
- The character set of the input files.
619
- @default 'utf8'
620
- @deprecated This option will be removed in TypeScript 5.5.
621
- */
307
+ The character set of the input files.
308
+
309
+ @default 'utf8'
310
+ @deprecated This option will be removed in TypeScript 5.5.
311
+ */
622
312
  charset?: string;
623
313
  /**
624
- Enables building for project references.
625
- @default true
626
- */
314
+ Enables building for project references.
315
+
316
+ @default true
317
+ */
627
318
  composite?: boolean;
628
319
  /**
629
- Generates corresponding d.ts files.
630
- @default false
631
- */
320
+ Generates corresponding d.ts files.
321
+
322
+ @default false
323
+ */
632
324
  declaration?: boolean;
633
325
  /**
634
- Specify output directory for generated declaration files.
635
- */
326
+ Specify output directory for generated declaration files.
327
+ */
636
328
  declarationDir?: string;
637
329
  /**
638
- Show diagnostic information.
639
- @default false
640
- */
330
+ Show diagnostic information.
331
+
332
+ @default false
333
+ */
641
334
  diagnostics?: boolean;
642
335
  /**
643
- Reduce the number of projects loaded automatically by TypeScript.
644
- @default false
645
- */
336
+ Reduce the number of projects loaded automatically by TypeScript.
337
+
338
+ @default false
339
+ */
646
340
  disableReferencedProjectLoad?: boolean;
647
341
  /**
648
- Enforces using indexed accessors for keys declared using an indexed type.
649
- @default false
650
- */
342
+ Enforces using indexed accessors for keys declared using an indexed type.
343
+
344
+ @default false
345
+ */
651
346
  noPropertyAccessFromIndexSignature?: boolean;
652
347
  /**
653
- Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.
654
- @default false
655
- */
348
+ Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.
349
+
350
+ @default false
351
+ */
656
352
  emitBOM?: boolean;
657
353
  /**
658
- Only emit `.d.ts` declaration files.
659
- @default false
660
- */
354
+ Only emit `.d.ts` declaration files.
355
+
356
+ @default false
357
+ */
661
358
  emitDeclarationOnly?: boolean;
662
359
  /**
663
- Differentiate between undefined and not present when type checking.
664
- @default false
665
- */
360
+ Differentiate between undefined and not present when type checking.
361
+
362
+ @default false
363
+ */
666
364
  exactOptionalPropertyTypes?: boolean;
667
365
  /**
668
- Enable incremental compilation.
669
- @default `composite`
670
- */
366
+ Enable incremental compilation.
367
+
368
+ @default `composite`
369
+ */
671
370
  incremental?: boolean;
672
371
  /**
673
- Specify file to store incremental compilation information.
674
- @default '.tsbuildinfo'
675
- */
372
+ Specify file to store incremental compilation information.
373
+
374
+ @default '.tsbuildinfo'
375
+ */
676
376
  tsBuildInfoFile?: string;
677
377
  /**
678
- Emit a single file with source maps instead of having a separate file.
679
- @default false
680
- */
378
+ Emit a single file with source maps instead of having a separate file.
379
+
380
+ @default false
381
+ */
681
382
  inlineSourceMap?: boolean;
682
383
  /**
683
- Emit the source alongside the sourcemaps within a single file.
684
- Requires `--inlineSourceMap` to be set.
685
- @default false
686
- */
384
+ Emit the source alongside the sourcemaps within a single file.
385
+
386
+ Requires `--inlineSourceMap` to be set.
387
+
388
+ @default false
389
+ */
687
390
  inlineSources?: boolean;
688
391
  /**
689
- Specify what JSX code is generated.
690
- @default 'preserve'
691
- */
392
+ Specify what JSX code is generated.
393
+
394
+ @default 'preserve'
395
+ */
692
396
  jsx?: CompilerOptions.JSX;
693
397
  /**
694
- Specifies the object invoked for `createElement` and `__spread` when targeting `'react'` JSX emit.
695
- @default 'React'
696
- */
398
+ Specifies the object invoked for `createElement` and `__spread` when targeting `'react'` JSX emit.
399
+
400
+ @default 'React'
401
+ */
697
402
  reactNamespace?: string;
698
403
  /**
699
- Specify the JSX factory function to use when targeting React JSX emit, e.g. `React.createElement` or `h`.
700
- @default 'React.createElement'
701
- */
404
+ Specify the JSX factory function to use when targeting React JSX emit, e.g. `React.createElement` or `h`.
405
+
406
+ @default 'React.createElement'
407
+ */
702
408
  jsxFactory?: string;
703
409
  /**
704
- Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.
705
- @default 'React.Fragment'
706
- */
410
+ Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.
411
+
412
+ @default 'React.Fragment'
413
+ */
707
414
  jsxFragmentFactory?: string;
708
415
  /**
709
- Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.
710
- @default 'react'
711
- */
416
+ Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.
417
+
418
+ @default 'react'
419
+ */
712
420
  jsxImportSource?: string;
713
421
  /**
714
- Print names of files part of the compilation.
715
- @default false
716
- */
422
+ Print names of files part of the compilation.
423
+
424
+ @default false
425
+ */
717
426
  listFiles?: boolean;
718
427
  /**
719
- Specifies the location where debugger should locate map files instead of generated locations.
720
- */
428
+ Specifies the location where debugger should locate map files instead of generated locations.
429
+ */
721
430
  mapRoot?: string;
722
431
  /**
723
- Specify module code generation: 'None', 'CommonJS', 'AMD', 'System', 'UMD', 'ES6', 'ES2015' or 'ESNext'. Only 'AMD' and 'System' can be used in conjunction with `--outFile`. 'ES6' and 'ES2015' values may be used when targeting 'ES5' or lower.
724
- @default ['ES3', 'ES5'].includes(target) ? 'CommonJS' : 'ES6'
725
- */
432
+ Specify module code generation: 'None', 'CommonJS', 'AMD', 'System', 'UMD', 'ES6', 'ES2015' or 'ESNext'. Only 'AMD' and 'System' can be used in conjunction with `--outFile`. 'ES6' and 'ES2015' values may be used when targeting 'ES5' or lower.
433
+
434
+ @default ['ES3', 'ES5'].includes(target) ? 'CommonJS' : 'ES6'
435
+ */
726
436
  module?: CompilerOptions.Module;
727
437
  /**
728
- Specifies module resolution strategy: 'node' (Node) or 'classic' (TypeScript pre 1.6).
729
- @default ['AMD', 'System', 'ES6'].includes(module) ? 'classic' : 'node'
730
- */
438
+ Specifies module resolution strategy: 'node' (Node) or 'classic' (TypeScript pre 1.6).
439
+
440
+ @default ['AMD', 'System', 'ES6'].includes(module) ? 'classic' : 'node'
441
+ */
731
442
  moduleResolution?: CompilerOptions.ModuleResolution;
732
443
  /**
733
- Specifies the end of line sequence to be used when emitting files: 'crlf' (Windows) or 'lf' (Unix).
734
- @default 'LF'
735
- */
444
+ Specifies the end of line sequence to be used when emitting files: 'crlf' (Windows) or 'lf' (Unix).
445
+
446
+ @default 'LF'
447
+ */
736
448
  newLine?: CompilerOptions.NewLine;
737
449
  /**
738
- Disable full type checking (only critical parse and emit errors will be reported).
739
- @default false
740
- */
450
+ Disable full type checking (only critical parse and emit errors will be reported).
451
+
452
+ @default false
453
+ */
741
454
  noCheck?: boolean;
742
455
  /**
743
- Do not emit output.
744
- @default false
745
- */
456
+ Do not emit output.
457
+
458
+ @default false
459
+ */
746
460
  noEmit?: boolean;
747
461
  /**
748
- Do not generate custom helper functions like `__extends` in compiled output.
749
- @default false
750
- */
462
+ Do not generate custom helper functions like `__extends` in compiled output.
463
+
464
+ @default false
465
+ */
751
466
  noEmitHelpers?: boolean;
752
467
  /**
753
- Do not emit outputs if any type checking errors were reported.
754
- @default false
755
- */
468
+ Do not emit outputs if any type checking errors were reported.
469
+
470
+ @default false
471
+ */
756
472
  noEmitOnError?: boolean;
757
473
  /**
758
- Warn on expressions and declarations with an implied 'any' type.
759
- @default false
760
- */
474
+ Warn on expressions and declarations with an implied 'any' type.
475
+
476
+ @default false
477
+ */
761
478
  noImplicitAny?: boolean;
762
479
  /**
763
- Raise error on 'this' expressions with an implied any type.
764
- @default false
765
- */
480
+ Raise error on 'this' expressions with an implied any type.
481
+
482
+ @default false
483
+ */
766
484
  noImplicitThis?: boolean;
767
485
  /**
768
- Report errors on unused locals.
769
- @default false
770
- */
486
+ Report errors on unused locals.
487
+
488
+ @default false
489
+ */
771
490
  noUnusedLocals?: boolean;
772
491
  /**
773
- Report errors on unused parameters.
774
- @default false
775
- */
492
+ Report errors on unused parameters.
493
+
494
+ @default false
495
+ */
776
496
  noUnusedParameters?: boolean;
777
497
  /**
778
- Do not include the default library file (lib.d.ts).
779
- @default false
780
- */
498
+ Do not include the default library file (lib.d.ts).
499
+
500
+ @default false
501
+ */
781
502
  noLib?: boolean;
782
503
  /**
783
- Do not add triple-slash references or module import targets to the list of compiled files.
784
- @default false
785
- */
504
+ Do not add triple-slash references or module import targets to the list of compiled files.
505
+
506
+ @default false
507
+ */
786
508
  noResolve?: boolean;
787
509
  /**
788
- Disable strict checking of generic signatures in function types.
789
- @default false
790
- @deprecated This option will be removed in TypeScript 5.5.
791
- */
510
+ Disable strict checking of generic signatures in function types.
511
+
512
+ @default false
513
+ @deprecated This option will be removed in TypeScript 5.5.
514
+ */
792
515
  noStrictGenericChecks?: boolean;
793
516
  /**
794
- @deprecated use `skipLibCheck` instead.
795
- */
517
+ @deprecated use `skipLibCheck` instead.
518
+ */
796
519
  skipDefaultLibCheck?: boolean;
797
520
  /**
798
- Skip type checking of declaration files.
799
- @default false
800
- */
521
+ Skip type checking of declaration files.
522
+
523
+ @default false
524
+ */
801
525
  skipLibCheck?: boolean;
802
526
  /**
803
- Concatenate and emit output to single file.
804
- */
527
+ Concatenate and emit output to single file.
528
+ */
805
529
  outFile?: string;
806
530
  /**
807
- Redirect output structure to the directory.
808
- */
531
+ Redirect output structure to the directory.
532
+ */
809
533
  outDir?: string;
810
534
  /**
811
- Do not erase const enum declarations in generated code.
812
- @default false
813
- */
535
+ Do not erase const enum declarations in generated code.
536
+
537
+ @default false
538
+ */
814
539
  preserveConstEnums?: boolean;
815
540
  /**
816
- Do not resolve symlinks to their real path; treat a symlinked file like a real one.
817
- @default false
818
- */
541
+ Do not resolve symlinks to their real path; treat a symlinked file like a real one.
542
+
543
+ @default false
544
+ */
819
545
  preserveSymlinks?: boolean;
820
546
  /**
821
- Keep outdated console output in watch mode instead of clearing the screen.
822
- @default false
823
- */
547
+ Keep outdated console output in watch mode instead of clearing the screen.
548
+
549
+ @default false
550
+ */
824
551
  preserveWatchOutput?: boolean;
825
552
  /**
826
- Stylize errors and messages using color and context (experimental).
827
- @default true // Unless piping to another program or redirecting output to a file.
828
- */
553
+ Stylize errors and messages using color and context (experimental).
554
+
555
+ @default true // Unless piping to another program or redirecting output to a file.
556
+ */
829
557
  pretty?: boolean;
830
558
  /**
831
- Do not emit comments to output.
832
- @default false
833
- */
559
+ Do not emit comments to output.
560
+
561
+ @default false
562
+ */
834
563
  removeComments?: boolean;
835
564
  /**
836
- Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files.
837
- @default false
838
- */
565
+ Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files.
566
+
567
+ @default false
568
+ */
839
569
  rewriteRelativeImportExtensions?: boolean;
840
570
  /**
841
- Specifies the root directory of input files.
842
- Use to control the output directory structure with `--outDir`.
843
- */
571
+ Specifies the root directory of input files.
572
+
573
+ Use to control the output directory structure with `--outDir`.
574
+ */
844
575
  rootDir?: string;
845
576
  /**
846
- Unconditionally emit imports for unresolved files.
847
- @default false
848
- */
577
+ Unconditionally emit imports for unresolved files.
578
+
579
+ @default false
580
+ */
849
581
  isolatedModules?: boolean;
850
582
  /**
851
- Require sufficient annotation on exports so other tools can trivially generate declaration files.
852
- @default false
853
- */
583
+ Require sufficient annotation on exports so other tools can trivially generate declaration files.
584
+
585
+ @default false
586
+ */
854
587
  isolatedDeclarations?: boolean;
855
588
  /**
856
- Generates corresponding '.map' file.
857
- @default false
858
- */
589
+ Generates corresponding '.map' file.
590
+
591
+ @default false
592
+ */
859
593
  sourceMap?: boolean;
860
594
  /**
861
- Specifies the location where debugger should locate TypeScript files instead of source locations.
862
- */
595
+ Specifies the location where debugger should locate TypeScript files instead of source locations.
596
+ */
863
597
  sourceRoot?: string;
864
598
  /**
865
- Suppress excess property checks for object literals.
866
- @default false
867
- @deprecated This option will be removed in TypeScript 5.5.
868
- */
599
+ Suppress excess property checks for object literals.
600
+
601
+ @default false
602
+ @deprecated This option will be removed in TypeScript 5.5.
603
+ */
869
604
  suppressExcessPropertyErrors?: boolean;
870
605
  /**
871
- Suppress noImplicitAny errors for indexing objects lacking index signatures.
872
- @default false
873
- @deprecated This option will be removed in TypeScript 5.5.
874
- */
606
+ Suppress noImplicitAny errors for indexing objects lacking index signatures.
607
+
608
+ @default false
609
+ @deprecated This option will be removed in TypeScript 5.5.
610
+ */
875
611
  suppressImplicitAnyIndexErrors?: boolean;
876
612
  /**
877
- Do not emit declarations for code that has an `@internal` annotation.
878
- */
613
+ Do not emit declarations for code that has an `@internal` annotation.
614
+ */
879
615
  stripInternal?: boolean;
880
616
  /**
881
- Specify ECMAScript target version.
882
- @default 'es3'
883
- */
617
+ Specify ECMAScript target version.
618
+
619
+ @default 'es3'
620
+ */
884
621
  target?: CompilerOptions.Target;
885
622
  /**
886
- Default catch clause variables as `unknown` instead of `any`.
887
- @default false
888
- */
623
+ Default catch clause variables as `unknown` instead of `any`.
624
+
625
+ @default false
626
+ */
889
627
  useUnknownInCatchVariables?: boolean;
890
628
  /**
891
- Watch input files.
892
- @default false
893
- @deprecated Use watchOptions instead.
894
- */
629
+ Watch input files.
630
+
631
+ @default false
632
+ @deprecated Use watchOptions instead.
633
+ */
895
634
  watch?: boolean;
896
635
  /**
897
- Specify the polling strategy to use when the system runs out of or doesn't support native file watchers.
898
- @deprecated Use watchOptions.fallbackPolling instead.
899
- */
636
+ Specify the polling strategy to use when the system runs out of or doesn't support native file watchers.
637
+
638
+ @deprecated Use watchOptions.fallbackPolling instead.
639
+ */
900
640
  fallbackPolling?: CompilerOptions.FallbackPolling;
901
641
  /**
902
- Specify the strategy for watching directories under systems that lack recursive file-watching functionality.
903
- @default 'useFsEvents'
904
- @deprecated Use watchOptions.watchDirectory instead.
905
- */
642
+ Specify the strategy for watching directories under systems that lack recursive file-watching functionality.
643
+
644
+ @default 'useFsEvents'
645
+ @deprecated Use watchOptions.watchDirectory instead.
646
+ */
906
647
  watchDirectory?: CompilerOptions.WatchDirectory;
907
648
  /**
908
- Specify the strategy for watching individual files.
909
- @default 'useFsEvents'
910
- @deprecated Use watchOptions.watchFile instead.
911
- */
649
+ Specify the strategy for watching individual files.
650
+
651
+ @default 'useFsEvents'
652
+ @deprecated Use watchOptions.watchFile instead.
653
+ */
912
654
  watchFile?: CompilerOptions.WatchFile;
913
655
  /**
914
- Enables experimental support for ES7 decorators.
915
- @default false
916
- */
656
+ Enables experimental support for ES7 decorators.
657
+
658
+ @default false
659
+ */
917
660
  experimentalDecorators?: boolean;
918
661
  /**
919
- Emit design-type metadata for decorated declarations in source.
920
- @default false
921
- */
662
+ Emit design-type metadata for decorated declarations in source.
663
+
664
+ @default false
665
+ */
922
666
  emitDecoratorMetadata?: boolean;
923
667
  /**
924
- Do not report errors on unused labels.
925
- @default false
926
- */
668
+ Do not report errors on unused labels.
669
+
670
+ @default false
671
+ */
927
672
  allowUnusedLabels?: boolean;
928
673
  /**
929
- Report error when not all code paths in function return a value.
930
- @default false
931
- */
674
+ Report error when not all code paths in function return a value.
675
+
676
+ @default false
677
+ */
932
678
  noImplicitReturns?: boolean;
933
679
  /**
934
- Add `undefined` to a type when accessed using an index.
935
- @default false
936
- */
680
+ Add `undefined` to a type when accessed using an index.
681
+
682
+ @default false
683
+ */
937
684
  noUncheckedIndexedAccess?: boolean;
938
685
  /**
939
- Report error if failed to find a source file for a side effect import.
940
- @default false
941
- */
686
+ Report error if failed to find a source file for a side effect import.
687
+
688
+ @default false
689
+ */
942
690
  noUncheckedSideEffectImports?: boolean;
943
691
  /**
944
- Report errors for fallthrough cases in switch statement.
945
- @default false
946
- */
692
+ Report errors for fallthrough cases in switch statement.
693
+
694
+ @default false
695
+ */
947
696
  noFallthroughCasesInSwitch?: boolean;
948
697
  /**
949
- Ensure overriding members in derived classes are marked with an override modifier.
950
- @default false
951
- */
698
+ Ensure overriding members in derived classes are marked with an override modifier.
699
+
700
+ @default false
701
+ */
952
702
  noImplicitOverride?: boolean;
953
703
  /**
954
- Do not report errors on unreachable code.
955
- @default false
956
- */
704
+ Do not report errors on unreachable code.
705
+
706
+ @default false
707
+ */
957
708
  allowUnreachableCode?: boolean;
958
709
  /**
959
- Disallow inconsistently-cased references to the same file.
960
- @default true
961
- */
710
+ Disallow inconsistently-cased references to the same file.
711
+
712
+ @default true
713
+ */
962
714
  forceConsistentCasingInFileNames?: boolean;
963
715
  /**
964
- Emit a v8 CPU profile of the compiler run for debugging.
965
- @default 'profile.cpuprofile'
966
- */
716
+ Emit a v8 CPU profile of the compiler run for debugging.
717
+
718
+ @default 'profile.cpuprofile'
719
+ */
967
720
  generateCpuProfile?: string;
968
721
  /**
969
- Generates an event trace and a list of types.
970
- */
722
+ Generates an event trace and a list of types.
723
+ */
971
724
  generateTrace?: boolean;
972
725
  /**
973
- Base directory to resolve non-relative module names.
974
- */
726
+ Base directory to resolve non-relative module names.
727
+ */
975
728
  baseUrl?: string;
976
729
  /**
977
- Specify path mapping to be computed relative to baseUrl option.
978
- */
730
+ Specify path mapping to be computed relative to baseUrl option.
731
+ */
979
732
  paths?: Record<string, string[]>;
980
733
  /**
981
- List of TypeScript language server plugins to load.
982
- */
734
+ List of TypeScript language server plugins to load.
735
+ */
983
736
  plugins?: CompilerOptions.Plugin[];
984
737
  /**
985
- Specify list of root directories to be used when resolving modules.
986
- */
738
+ Specify list of root directories to be used when resolving modules.
739
+ */
987
740
  rootDirs?: string[];
988
741
  /**
989
- Specify list of directories for type definition files to be included.
990
- */
742
+ Specify list of directories for type definition files to be included.
743
+ */
991
744
  typeRoots?: string[];
992
745
  /**
993
- Type declaration files to be included in compilation.
994
- */
746
+ Type declaration files to be included in compilation.
747
+ */
995
748
  types?: string[];
996
749
  /**
997
- Enable tracing of the name resolution process.
998
- @default false
999
- */
750
+ Enable tracing of the name resolution process.
751
+
752
+ @default false
753
+ */
1000
754
  traceResolution?: boolean;
1001
755
  /**
1002
- Allow javascript files to be compiled.
1003
- @default false
1004
- */
756
+ Allow javascript files to be compiled.
757
+
758
+ @default false
759
+ */
1005
760
  allowJs?: boolean;
1006
761
  /**
1007
- Do not truncate error messages.
1008
- @default false
1009
- */
762
+ Do not truncate error messages.
763
+
764
+ @default false
765
+ */
1010
766
  noErrorTruncation?: boolean;
1011
767
  /**
1012
- Allow default imports from modules with no default export. This does not affect code emit, just typechecking.
1013
- @default module === 'system' || esModuleInterop
1014
- */
768
+ Allow default imports from modules with no default export. This does not affect code emit, just typechecking.
769
+
770
+ @default module === 'system' || esModuleInterop
771
+ */
1015
772
  allowSyntheticDefaultImports?: boolean;
1016
773
  /**
1017
- Do not emit `'use strict'` directives in module output.
1018
- @default false
1019
- @deprecated This option will be removed in TypeScript 5.5.
1020
- */
774
+ Do not emit `'use strict'` directives in module output.
775
+
776
+ @default false
777
+ @deprecated This option will be removed in TypeScript 5.5.
778
+ */
1021
779
  noImplicitUseStrict?: boolean;
1022
780
  /**
1023
- Enable to list all emitted files.
1024
- @default false
1025
- */
781
+ Enable to list all emitted files.
782
+
783
+ @default false
784
+ */
1026
785
  listEmittedFiles?: boolean;
1027
786
  /**
1028
- Disable size limit for JavaScript project.
1029
- @default false
1030
- */
787
+ Disable size limit for JavaScript project.
788
+
789
+ @default false
790
+ */
1031
791
  disableSizeLimit?: boolean;
1032
792
  /**
1033
- List of library files to be included in the compilation.
1034
- */
793
+ List of library files to be included in the compilation.
794
+ */
1035
795
  lib?: CompilerOptions.Lib[];
1036
796
  /**
1037
- Enable strict null checks.
1038
- @default false
1039
- */
797
+ Enable strict null checks.
798
+
799
+ @default false
800
+ */
1040
801
  strictNullChecks?: boolean;
1041
802
  /**
1042
- The maximum dependency depth to search under `node_modules` and load JavaScript files. Only applicable with `--allowJs`.
1043
- @default 0
1044
- */
803
+ The maximum dependency depth to search under `node_modules` and load JavaScript files. Only applicable with `--allowJs`.
804
+
805
+ @default 0
806
+ */
1045
807
  maxNodeModuleJsDepth?: number;
1046
808
  /**
1047
- Import emit helpers (e.g. `__extends`, `__rest`, etc..) from tslib.
1048
- @default false
1049
- */
809
+ Import emit helpers (e.g. `__extends`, `__rest`, etc..) from tslib.
810
+
811
+ @default false
812
+ */
1050
813
  importHelpers?: boolean;
1051
814
  /**
1052
- Specify emit/checking behavior for imports that are only used for types.
1053
- @default 'remove'
1054
- @deprecated Use `verbatimModuleSyntax` instead.
1055
- */
815
+ Specify emit/checking behavior for imports that are only used for types.
816
+
817
+ @default 'remove'
818
+ @deprecated Use `verbatimModuleSyntax` instead.
819
+ */
1056
820
  importsNotUsedAsValues?: CompilerOptions.ImportsNotUsedAsValues;
1057
821
  /**
1058
- Parse in strict mode and emit `'use strict'` for each source file.
1059
- @default false
1060
- */
822
+ Parse in strict mode and emit `'use strict'` for each source file.
823
+
824
+ @default false
825
+ */
1061
826
  alwaysStrict?: boolean;
1062
827
  /**
1063
- Enable all strict type checking options.
1064
- @default false
1065
- */
828
+ Enable all strict type checking options.
829
+
830
+ @default false
831
+ */
1066
832
  strict?: boolean;
1067
833
  /**
1068
- Enable stricter checking of of the `bind`, `call`, and `apply` methods on functions.
1069
- @default false
1070
- */
834
+ Enable stricter checking of of the `bind`, `call`, and `apply` methods on functions.
835
+
836
+ @default false
837
+ */
1071
838
  strictBindCallApply?: boolean;
1072
839
  /**
1073
- Provide full support for iterables in `for-of`, spread, and destructuring when targeting `ES5` or `ES3`.
1074
- @default false
1075
- */
840
+ Provide full support for iterables in `for-of`, spread, and destructuring when targeting `ES5` or `ES3`.
841
+
842
+ @default false
843
+ */
1076
844
  downlevelIteration?: boolean;
1077
845
  /**
1078
- Report errors in `.js` files.
1079
- @default false
1080
- */
846
+ Report errors in `.js` files.
847
+
848
+ @default false
849
+ */
1081
850
  checkJs?: boolean;
1082
851
  /**
1083
- Built-in iterators are instantiated with a `TReturn` type of undefined instead of `any`.
1084
- @default false
1085
- */
852
+ Built-in iterators are instantiated with a `TReturn` type of undefined instead of `any`.
853
+
854
+ @default false
855
+ */
1086
856
  strictBuiltinIteratorReturn?: boolean;
1087
857
  /**
1088
- Disable bivariant parameter checking for function types.
1089
- @default false
1090
- */
858
+ Disable bivariant parameter checking for function types.
859
+
860
+ @default false
861
+ */
1091
862
  strictFunctionTypes?: boolean;
1092
863
  /**
1093
- Ensure non-undefined class properties are initialized in the constructor.
1094
- @default false
1095
- */
864
+ Ensure non-undefined class properties are initialized in the constructor.
865
+
866
+ @default false
867
+ */
1096
868
  strictPropertyInitialization?: boolean;
1097
869
  /**
1098
- Emit `__importStar` and `__importDefault` helpers for runtime Babel ecosystem compatibility and enable `--allowSyntheticDefaultImports` for typesystem compatibility.
1099
- @default false
1100
- */
870
+ Emit `__importStar` and `__importDefault` helpers for runtime Babel ecosystem compatibility and enable `--allowSyntheticDefaultImports` for typesystem compatibility.
871
+
872
+ @default false
873
+ */
1101
874
  esModuleInterop?: boolean;
1102
875
  /**
1103
- Allow accessing UMD globals from modules.
1104
- @default false
1105
- */
876
+ Allow accessing UMD globals from modules.
877
+
878
+ @default false
879
+ */
1106
880
  allowUmdGlobalAccess?: boolean;
1107
881
  /**
1108
- Resolve `keyof` to string valued property names only (no numbers or symbols).
1109
- @default false
1110
- @deprecated This option will be removed in TypeScript 5.5.
1111
- */
882
+ Resolve `keyof` to string valued property names only (no numbers or symbols).
883
+
884
+ @default false
885
+ @deprecated This option will be removed in TypeScript 5.5.
886
+ */
1112
887
  keyofStringsOnly?: boolean;
1113
888
  /**
1114
- Emit ECMAScript standard class fields.
1115
- @default false
1116
- */
889
+ Emit ECMAScript standard class fields.
890
+
891
+ @default false
892
+ */
1117
893
  useDefineForClassFields?: boolean;
1118
894
  /**
1119
- Generates a sourcemap for each corresponding `.d.ts` file.
1120
- @default false
1121
- */
895
+ Generates a sourcemap for each corresponding `.d.ts` file.
896
+
897
+ @default false
898
+ */
1122
899
  declarationMap?: boolean;
1123
900
  /**
1124
- Include modules imported with `.json` extension.
1125
- @default false
1126
- */
901
+ Include modules imported with `.json` extension.
902
+
903
+ @default false
904
+ */
1127
905
  resolveJsonModule?: boolean;
1128
906
  /**
1129
- Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it.
1130
- @default false
1131
- */
907
+ Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it.
908
+
909
+ @default false
910
+ */
1132
911
  assumeChangesOnlyAffectDirectDependencies?: boolean;
1133
912
  /**
1134
- Output more detailed compiler performance information after building.
1135
- @default false
1136
- */
913
+ Output more detailed compiler performance information after building.
914
+
915
+ @default false
916
+ */
1137
917
  extendedDiagnostics?: boolean;
1138
918
  /**
1139
- Print names of files that are part of the compilation and then stop processing.
1140
- @default false
1141
- */
919
+ Print names of files that are part of the compilation and then stop processing.
920
+
921
+ @default false
922
+ */
1142
923
  listFilesOnly?: boolean;
1143
924
  /**
1144
- Disable preferring source files instead of declaration files when referencing composite projects.
1145
- @default true if composite, false otherwise
1146
- */
925
+ Disable preferring source files instead of declaration files when referencing composite projects.
926
+
927
+ @default true if composite, false otherwise
928
+ */
1147
929
  disableSourceOfProjectReferenceRedirect?: boolean;
1148
930
  /**
1149
- Opt a project out of multi-project reference checking when editing.
1150
- @default false
1151
- */
931
+ Opt a project out of multi-project reference checking when editing.
932
+
933
+ @default false
934
+ */
1152
935
  disableSolutionSearching?: boolean;
1153
936
  /**
1154
- Print names of files which TypeScript sees as a part of your project and the reason they are part of the compilation.
1155
- @default false
1156
- */
937
+ Print names of files which TypeScript sees as a part of your project and the reason they are part of the compilation.
938
+
939
+ @default false
940
+ */
1157
941
  explainFiles?: boolean;
1158
942
  /**
1159
- Preserve unused imported values in the JavaScript output that would otherwise be removed.
1160
- @default true
1161
- @deprecated Use `verbatimModuleSyntax` instead.
1162
- */
943
+ Preserve unused imported values in the JavaScript output that would otherwise be removed.
944
+
945
+ @default true
946
+ @deprecated Use `verbatimModuleSyntax` instead.
947
+ */
1163
948
  preserveValueImports?: boolean;
1164
949
  /**
1165
- List of file name suffixes to search when resolving a module.
1166
- */
950
+ List of file name suffixes to search when resolving a module.
951
+ */
1167
952
  moduleSuffixes?: string[];
1168
953
  /**
1169
- Control what method is used to detect module-format JS files.
1170
- @default 'auto'
1171
- */
954
+ Control what method is used to detect module-format JS files.
955
+
956
+ @default 'auto'
957
+ */
1172
958
  moduleDetection?: CompilerOptions.ModuleDetection;
1173
959
  /**
1174
- Allows TypeScript files to import each other with a TypeScript-specific extension like .ts, .mts, or .tsx.
1175
- @default false
1176
- */
960
+ Allows TypeScript files to import each other with a TypeScript-specific extension like .ts, .mts, or .tsx.
961
+
962
+ @default false
963
+ */
1177
964
  allowImportingTsExtensions?: boolean;
1178
965
  /**
1179
- Forces TypeScript to consult the exports field of package.json files if it ever reads from a package in node_modules.
1180
- @default false
1181
- */
966
+ Forces TypeScript to consult the exports field of package.json files if it ever reads from a package in node_modules.
967
+
968
+ @default false
969
+ */
1182
970
  resolvePackageJsonExports?: boolean;
1183
971
  /**
1184
- Forces TypeScript to consult the imports field of package.json files when performing a lookup that starts with # from a file whose ancestor directory contains a package.json.
1185
- @default false
1186
- */
972
+ Forces TypeScript to consult the imports field of package.json files when performing a lookup that starts with # from a file whose ancestor directory contains a package.json.
973
+
974
+ @default false
975
+ */
1187
976
  resolvePackageJsonImports?: boolean;
1188
977
  /**
1189
- Suppress errors for file formats that TypeScript does not understand.
1190
- @default false
1191
- */
978
+ Suppress errors for file formats that TypeScript does not understand.
979
+
980
+ @default false
981
+ */
1192
982
  allowArbitraryExtensions?: boolean;
1193
983
  /**
1194
- List of additional conditions that should succeed when TypeScript resolves from package.json.
1195
- */
984
+ List of additional conditions that should succeed when TypeScript resolves from package.json.
985
+ */
1196
986
  customConditions?: string[];
1197
987
  /**
1198
- Anything that uses the type modifier is dropped entirely.
1199
- @default false
1200
- */
988
+ Anything that uses the type modifier is dropped entirely.
989
+
990
+ @default false
991
+ */
1201
992
  verbatimModuleSyntax?: boolean;
1202
993
  /**
1203
- Suppress deprecation warnings
1204
- */
994
+ Suppress deprecation warnings
995
+ */
1205
996
  ignoreDeprecations?: CompilerOptions.IgnoreDeprecations;
1206
997
  /**
1207
- Do not allow runtime constructs that are not part of ECMAScript.
1208
- @default false
1209
- */
998
+ Do not allow runtime constructs that are not part of ECMAScript.
999
+
1000
+ @default false
1001
+ */
1210
1002
  erasableSyntaxOnly?: boolean;
1211
1003
  /**
1212
- Enable lib replacement.
1213
- @default true
1214
- */
1004
+ Enable lib replacement.
1005
+
1006
+ @default true
1007
+ */
1215
1008
  libReplacement?: boolean;
1216
1009
  };
1217
1010
  namespace WatchOptions {
@@ -1221,71 +1014,74 @@ declare namespace TsConfigJson {
1221
1014
  }
1222
1015
  type WatchOptions = {
1223
1016
  /**
1224
- Specify the strategy for watching individual files.
1225
- @default 'UseFsEvents'
1226
- */
1017
+ Specify the strategy for watching individual files.
1018
+
1019
+ @default 'UseFsEvents'
1020
+ */
1227
1021
  watchFile?: WatchOptions.WatchFileKind | Lowercase<WatchOptions.WatchFileKind>;
1228
1022
  /**
1229
- Specify the strategy for watching directories under systems that lack recursive file-watching functionality.
1230
- @default 'UseFsEvents'
1231
- */
1023
+ Specify the strategy for watching directories under systems that lack recursive file-watching functionality.
1024
+
1025
+ @default 'UseFsEvents'
1026
+ */
1232
1027
  watchDirectory?: WatchOptions.WatchDirectoryKind | Lowercase<WatchOptions.WatchDirectoryKind>;
1233
1028
  /**
1234
- Specify the polling strategy to use when the system runs out of or doesn't support native file watchers.
1235
- */
1029
+ Specify the polling strategy to use when the system runs out of or doesn't support native file watchers.
1030
+ */
1236
1031
  fallbackPolling?: WatchOptions.PollingWatchKind | Lowercase<WatchOptions.PollingWatchKind>;
1237
1032
  /**
1238
- Enable synchronous updates on directory watchers for platforms that don't support recursive watching natively.
1239
- */
1033
+ Enable synchronous updates on directory watchers for platforms that don't support recursive watching natively.
1034
+ */
1240
1035
  synchronousWatchDirectory?: boolean;
1241
1036
  /**
1242
- Specifies a list of directories to exclude from watch.
1243
- */
1037
+ Specifies a list of directories to exclude from watch.
1038
+ */
1244
1039
  excludeDirectories?: string[];
1245
1040
  /**
1246
- Specifies a list of files to exclude from watch.
1247
- */
1041
+ Specifies a list of files to exclude from watch.
1042
+ */
1248
1043
  excludeFiles?: string[];
1249
1044
  };
1250
1045
  /**
1251
- Auto type (.d.ts) acquisition options for this project.
1252
- */
1046
+ Auto type (.d.ts) acquisition options for this project.
1047
+ */
1253
1048
  type TypeAcquisition = {
1254
1049
  /**
1255
- Enable auto type acquisition.
1256
- */
1050
+ Enable auto type acquisition.
1051
+ */
1257
1052
  enable?: boolean;
1258
1053
  /**
1259
- Specifies a list of type declarations to be included in auto type acquisition. For example, `['jquery', 'lodash']`.
1260
- */
1054
+ Specifies a list of type declarations to be included in auto type acquisition. For example, `['jquery', 'lodash']`.
1055
+ */
1261
1056
  include?: string[];
1262
1057
  /**
1263
- Specifies a list of type declarations to be excluded from auto type acquisition. For example, `['jquery', 'lodash']`.
1264
- */
1058
+ Specifies a list of type declarations to be excluded from auto type acquisition. For example, `['jquery', 'lodash']`.
1059
+ */
1265
1060
  exclude?: string[];
1266
1061
  /**
1267
- Disable infering what types should be added based on filenames in a project.
1268
- */
1062
+ Disable infering what types should be added based on filenames in a project.
1063
+ */
1269
1064
  disableFilenameBasedTypeAcquisition?: boolean;
1270
1065
  };
1271
1066
  type References = {
1272
1067
  /**
1273
- A normalized path on disk.
1274
- */
1068
+ A normalized path on disk.
1069
+ */
1275
1070
  path: string;
1276
1071
  /**
1277
- The path as the user originally wrote it.
1278
- */
1072
+ The path as the user originally wrote it.
1073
+ */
1279
1074
  originalPath?: string;
1280
1075
  /**
1281
- True if the output of this reference should be prepended to the output of this project.
1282
- Only valid for `--outFile` compilations.
1283
- @deprecated This option will be removed in TypeScript 5.5.
1284
- */
1076
+ True if the output of this reference should be prepended to the output of this project.
1077
+
1078
+ Only valid for `--outFile` compilations.
1079
+ @deprecated This option will be removed in TypeScript 5.5.
1080
+ */
1285
1081
  prepend?: boolean;
1286
1082
  /**
1287
- True if it is intended that this reference form a circularity.
1288
- */
1083
+ True if it is intended that this reference form a circularity.
1084
+ */
1289
1085
  circular?: boolean;
1290
1086
  };
1291
1087
  }
@@ -1296,277 +1092,324 @@ Type for [TypeScript's `tsconfig.json` file](https://www.typescriptlang.org/docs
1296
1092
  */
1297
1093
  type TsConfigJson = {
1298
1094
  /**
1299
- Instructs the TypeScript compiler how to compile `.ts` files.
1300
- */
1095
+ Instructs the TypeScript compiler how to compile `.ts` files.
1096
+ */
1301
1097
  compilerOptions?: TsConfigJson.CompilerOptions;
1302
1098
  /**
1303
- Instructs the TypeScript compiler how to watch files.
1304
- */
1099
+ Instructs the TypeScript compiler how to watch files.
1100
+ */
1305
1101
  watchOptions?: TsConfigJson.WatchOptions;
1306
1102
  /**
1307
- Auto type (.d.ts) acquisition options for this project.
1308
- */
1103
+ Auto type (.d.ts) acquisition options for this project.
1104
+ */
1309
1105
  typeAcquisition?: TsConfigJson.TypeAcquisition;
1310
1106
  /**
1311
- Enable Compile-on-Save for this project.
1312
- */
1107
+ Enable Compile-on-Save for this project.
1108
+ */
1313
1109
  compileOnSave?: boolean;
1314
1110
  /**
1315
- Path to base configuration file to inherit from.
1316
- */
1111
+ Path to base configuration file to inherit from.
1112
+ */
1317
1113
  extends?: string | string[];
1318
1114
  /**
1319
- If no `files` or `include` property is present in a `tsconfig.json`, the compiler defaults to including all files in the containing directory and subdirectories except those specified by `exclude`. When a `files` property is specified, only those files and those specified by `include` are included.
1320
- */
1115
+ If no `files` or `include` property is present in a `tsconfig.json`, the compiler defaults to including all files in the containing directory and subdirectories except those specified by `exclude`. When a `files` property is specified, only those files and those specified by `include` are included.
1116
+ */
1321
1117
  files?: string[];
1322
1118
  /**
1323
- Specifies a list of files to be excluded from compilation. The `exclude` property only affects the files included via the `include` property and not the `files` property.
1324
- Glob patterns require TypeScript version 2.0 or later.
1325
- */
1119
+ Specifies a list of files to be excluded from compilation. The `exclude` property only affects the files included via the `include` property and not the `files` property.
1120
+
1121
+ Glob patterns require TypeScript version 2.0 or later.
1122
+ */
1326
1123
  exclude?: string[];
1327
1124
  /**
1328
- Specifies a list of glob patterns that match files to be included in compilation.
1329
- If no `files` or `include` property is present in a `tsconfig.json`, the compiler defaults to including all files in the containing directory and subdirectories except those specified by `exclude`.
1330
- */
1125
+ Specifies a list of glob patterns that match files to be included in compilation.
1126
+
1127
+ If no `files` or `include` property is present in a `tsconfig.json`, the compiler defaults to including all files in the containing directory and subdirectories except those specified by `exclude`.
1128
+ */
1331
1129
  include?: string[];
1332
1130
  /**
1333
- Referenced projects.
1334
- */
1131
+ Referenced projects.
1132
+ */
1335
1133
  references?: TsConfigJson.References[];
1336
1134
  };
1337
1135
  //#endregion
1338
- //#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.26.0_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolver_4fe2e1acd1a0882df7c50b3958bba707/node_modules/rolldown-plugin-dts/dist/index.d.mts
1136
+ //#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.27.12_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolve_d94a4da753642eee691447f5bf042e95/node_modules/rolldown-plugin-dts/dist/index.d.mts
1339
1137
  //#region src/options.d.ts
1138
+ interface Logger$1 {
1139
+ info: (...args: any[]) => void;
1140
+ warn: (...args: any[]) => void;
1141
+ error: (...args: any[]) => void;
1142
+ }
1340
1143
  interface GeneralOptions {
1341
1144
  /**
1342
- * Glob pattern(s) to filter which entry files get `.d.ts` generation.
1343
- *
1344
- * When specified, only entry files matching these patterns will emit `.d.ts` chunks.
1345
- * When not specified, all entries get `.d.ts` generation.
1346
- *
1347
- * Supports negation patterns (e.g., `['**', '!src/icons/**']`) for exclusion.
1348
- * Patterns are matched against file paths relative to `cwd`.
1349
- *
1350
- * @example
1351
- * entry: 'src/index.ts'
1352
- * entry: ['src/*.ts', '!src/internal/**']
1353
- */
1145
+ * The generator used to produce `.d.ts` files.
1146
+ *
1147
+ * - `'tsc'`: The TypeScript 5.x/6.x compiler. Supports all TypeScript features.
1148
+ * - `'oxc'`: {@link https://oxc.rs Oxc}'s isolated declaration generator. Much
1149
+ * faster than `tsc`, but only supports code that satisfies
1150
+ * [`isolatedDeclarations`](https://www.typescriptlang.org/tsconfig/#isolatedDeclarations).
1151
+ * - `'tsgo'`: **[Experimental]** The TypeScript Go compiler
1152
+ * ({@link https://github.com/microsoft/typescript-go tsgo}). May not support
1153
+ * all TypeScript features yet.
1154
+ *
1155
+ * When unset, the generator is inferred:
1156
+ * - `'oxc'` if {@link Options.oxc oxc} options are provided or
1157
+ * `isolatedDeclarations` is enabled in `compilerOptions`.
1158
+ * - `'tsgo'` if TypeScript 7.0 (or `@typescript/native-preview`) is installed,
1159
+ * or {@link Options.tsgo tsgo} options are provided.
1160
+ * - `'tsc'` otherwise, and always when {@link TscOptions.vue vue} is enabled.
1161
+ *
1162
+ * @default 'tsc'
1163
+ */
1164
+ generator?: "tsc" | "oxc" | "tsgo";
1165
+ /**
1166
+ * Glob pattern(s) to filter which entry files get `.d.ts` generation.
1167
+ *
1168
+ * When specified, only entry files matching these patterns will emit `.d.ts` chunks.
1169
+ * When not specified, all entries get `.d.ts` generation.
1170
+ *
1171
+ * Supports negation patterns (e.g., `['**', '!src/icons/**']`) for exclusion.
1172
+ * Patterns are matched against file paths relative to `cwd`.
1173
+ *
1174
+ * @example
1175
+ * entry: 'src/index.ts'
1176
+ * entry: ['src/*.ts', '!src/internal/**']
1177
+ */
1354
1178
  entry?: string | string[];
1355
1179
  /**
1356
- * The directory in which the plugin will search for the `tsconfig.json` file.
1357
- */
1180
+ * The directory in which the plugin will search for the `tsconfig.json` file.
1181
+ */
1358
1182
  cwd?: string;
1359
1183
  /**
1360
- * Set to `true` if your entry files are `.d.ts` files instead of `.ts` files.
1361
- *
1362
- * When enabled, the plugin will skip generating a `.d.ts` file for the entry point.
1363
- */
1184
+ * Set to `true` if your entry files are `.d.ts` files instead of `.ts` files.
1185
+ *
1186
+ * When enabled, the plugin will skip generating a `.d.ts` file for the entry point.
1187
+ */
1364
1188
  dtsInput?: boolean;
1365
1189
  /**
1366
- * If `true`, the plugin will emit only `.d.ts` files and remove all other output chunks.
1367
- *
1368
- * This is especially useful when generating `.d.ts` files for the CommonJS format as part of a separate build step.
1369
- */
1190
+ * If `true`, the plugin will emit only `.d.ts` files and remove all other output chunks.
1191
+ *
1192
+ * This is especially useful when generating `.d.ts` files for the CommonJS format as part of a separate build step.
1193
+ */
1370
1194
  emitDtsOnly?: boolean;
1371
1195
  /**
1372
- * The path to the `tsconfig.json` file.
1373
- *
1374
- * If set to `false`, the plugin will ignore any `tsconfig.json` file.
1375
- * You can still specify `compilerOptions` directly in the options.
1376
- *
1377
- * @default 'tsconfig.json'
1378
- */
1196
+ * The path to the `tsconfig.json` file.
1197
+ *
1198
+ * If set to `false`, the plugin will ignore any `tsconfig.json` file.
1199
+ * You can still specify `compilerOptions` directly in the options.
1200
+ *
1201
+ * @default 'tsconfig.json'
1202
+ */
1379
1203
  tsconfig?: string | boolean;
1380
1204
  /**
1381
- * Pass a raw `tsconfig.json` object directly to the plugin.
1382
- *
1383
- * @see https://www.typescriptlang.org/tsconfig
1384
- */
1205
+ * Pass a raw `tsconfig.json` object directly to the plugin.
1206
+ *
1207
+ * @see https://www.typescriptlang.org/tsconfig
1208
+ */
1385
1209
  tsconfigRaw?: Omit<TsConfigJson, "compilerOptions">;
1386
1210
  /**
1387
- * Override the `compilerOptions` specified in `tsconfig.json`.
1388
- *
1389
- * @see https://www.typescriptlang.org/tsconfig/#compilerOptions
1390
- */
1211
+ * Override the `compilerOptions` specified in `tsconfig.json`.
1212
+ *
1213
+ * @see https://www.typescriptlang.org/tsconfig/#compilerOptions
1214
+ */
1391
1215
  compilerOptions?: TsConfigJson.CompilerOptions;
1392
1216
  /**
1393
- * If `true`, the plugin will generate declaration maps (`.d.ts.map`) for `.d.ts` files.
1394
- */
1217
+ * If `true`, the plugin will generate declaration maps (`.d.ts.map`) for `.d.ts` files.
1218
+ */
1395
1219
  sourcemap?: boolean;
1396
1220
  /**
1397
- * Specifies a resolver to resolve type definitions, especially for `node_modules`.
1398
- *
1399
- * - `'oxc'`: Uses Oxc's module resolution, which is faster and more efficient.
1400
- * - `'tsc'`: Uses TypeScript's native module resolution, which may be more compatible with complex setups, but slower.
1401
- *
1402
- * @default 'oxc'
1403
- */
1221
+ * Specifies a resolver to resolve type definitions, especially for `node_modules`.
1222
+ *
1223
+ * - `'oxc'`: Uses Oxc's module resolution, which is faster and more efficient.
1224
+ * - `'tsc'`: Uses TypeScript's native module resolution, which may be more compatible with complex setups, but slower.
1225
+ *
1226
+ * @default 'oxc'
1227
+ */
1404
1228
  resolver?: "oxc" | "tsc";
1405
1229
  /**
1406
- * Determines how the default export is emitted.
1407
- *
1408
- * If set to `true`, and you are only exporting a single item using `export default ...`,
1409
- * the output will use `export = ...` instead of the standard ES module syntax.
1410
- * This is useful for compatibility with CommonJS.
1411
- * This only controls the output format and does not enable support for
1412
- * CommonJS-style `.d.ts` input.
1413
- */
1230
+ * Determines how the default export is emitted.
1231
+ *
1232
+ * If set to `true`, and you are only exporting a single item using `export default ...`,
1233
+ * the output will use `export = ...` instead of the standard ES module syntax.
1234
+ * This is useful for compatibility with CommonJS.
1235
+ * This only controls the output format and does not enable support for
1236
+ * CommonJS-style `.d.ts` input.
1237
+ */
1414
1238
  cjsDefault?: boolean;
1415
1239
  /**
1416
- * Indicates whether the generated `.d.ts` files have side effects.
1417
- * - If set to `true`, Rolldown will treat the `.d.ts` files as having side effects during tree-shaking.
1418
- * - If set to `false`, Rolldown may consider the `.d.ts` files as side-effect-free, potentially removing them if they are not imported.
1419
- *
1420
- * @default false
1421
- */
1240
+ * Indicates whether the generated `.d.ts` files have side effects.
1241
+ * - If set to `true`, Rolldown will treat the `.d.ts` files as having side effects during tree-shaking.
1242
+ * - If set to `false`, Rolldown may consider the `.d.ts` files as side-effect-free, potentially removing them if they are not imported.
1243
+ *
1244
+ * @default false
1245
+ */
1422
1246
  sideEffects?: boolean;
1247
+ logger?: Logger$1;
1423
1248
  }
1424
1249
  interface TscOptions {
1425
1250
  /**
1426
- * Build mode for the TypeScript compiler:
1427
- *
1428
- * - If `true`, the plugin will use [`tsc -b`](https://www.typescriptlang.org/docs/handbook/project-references.html#build-mode-for-typescript) to build the project and all referenced projects before emitting `.d.ts` files.
1429
- * - If `false`, the plugin will use [`tsc`](https://www.typescriptlang.org/docs/handbook/compiler-options.html) to emit `.d.ts` files without building referenced projects.
1430
- *
1431
- * @default false
1432
- */
1251
+ * Build mode for the TypeScript compiler:
1252
+ *
1253
+ * - If `true`, the plugin will use [`tsc -b`](https://www.typescriptlang.org/docs/handbook/project-references.html#build-mode-for-typescript) to build the project and all referenced projects before emitting `.d.ts` files.
1254
+ * - If `false`, the plugin will use [`tsc`](https://www.typescriptlang.org/docs/handbook/compiler-options.html) to emit `.d.ts` files without building referenced projects.
1255
+ *
1256
+ * @default false
1257
+ */
1433
1258
  build?: boolean;
1434
1259
  /**
1435
- * If your tsconfig.json has
1436
- * [`references`](https://www.typescriptlang.org/tsconfig/#references) option,
1437
- * `rolldown-plugin-dts` will use [`tsc
1438
- * -b`](https://www.typescriptlang.org/docs/handbook/project-references.html#build-mode-for-typescript)
1439
- * to build the project and all referenced projects before emitting `.d.ts`
1440
- * files.
1441
- *
1442
- * In such case, if this option is `true`, `rolldown-plugin-dts` will write
1443
- * down all built files into your disk, including
1444
- * [`.tsbuildinfo`](https://www.typescriptlang.org/tsconfig/#tsBuildInfoFile)
1445
- * and other built files. This is equivalent to running `tsc -b` in your
1446
- * project.
1447
- *
1448
- * Otherwise, if this option is `false`, `rolldown-plugin-dts` will write
1449
- * built files only into memory and leave a small footprint in your disk.
1450
- *
1451
- * Enabling this option will decrease the build time by caching previous build
1452
- * results. This is helpful when you have a large project with multiple
1453
- * referenced projects.
1454
- *
1455
- * By default, `incremental` is `true` if your tsconfig has
1456
- * [`incremental`](https://www.typescriptlang.org/tsconfig/#incremental) or
1457
- * [`tsBuildInfoFile`](https://www.typescriptlang.org/tsconfig/#tsBuildInfoFile)
1458
- * enabled.
1459
- *
1460
- * This option is only used when {@link Options.oxc} is
1461
- * `false`.
1462
- */
1260
+ * If your tsconfig.json has
1261
+ * [`references`](https://www.typescriptlang.org/tsconfig/#references) option,
1262
+ * `rolldown-plugin-dts` will use [`tsc
1263
+ * -b`](https://www.typescriptlang.org/docs/handbook/project-references.html#build-mode-for-typescript)
1264
+ * to build the project and all referenced projects before emitting `.d.ts`
1265
+ * files.
1266
+ *
1267
+ * In such case, if this option is `true`, `rolldown-plugin-dts` will write
1268
+ * down all built files into your disk, including
1269
+ * [`.tsbuildinfo`](https://www.typescriptlang.org/tsconfig/#tsBuildInfoFile)
1270
+ * and other built files. This is equivalent to running `tsc -b` in your
1271
+ * project.
1272
+ *
1273
+ * Otherwise, if this option is `false`, `rolldown-plugin-dts` will write
1274
+ * built files only into memory and leave a small footprint in your disk.
1275
+ *
1276
+ * Enabling this option will decrease the build time by caching previous build
1277
+ * results. This is helpful when you have a large project with multiple
1278
+ * referenced projects.
1279
+ *
1280
+ * By default, `incremental` is `true` if your tsconfig has
1281
+ * [`incremental`](https://www.typescriptlang.org/tsconfig/#incremental) or
1282
+ * [`tsBuildInfoFile`](https://www.typescriptlang.org/tsconfig/#tsBuildInfoFile)
1283
+ * enabled.
1284
+ *
1285
+ * This option is only used when {@link Options.oxc} is
1286
+ * `false`.
1287
+ */
1463
1288
  incremental?: boolean;
1464
1289
  /**
1465
- * If `true`, the plugin will generate `.d.ts` files using `vue-tsc`.
1466
- */
1290
+ * If `true`, the plugin will generate `.d.ts` files using `vue-tsc`.
1291
+ */
1467
1292
  vue?: boolean;
1468
1293
  /**
1469
- * If `true`, the plugin will generate `.d.ts` files using `@ts-macro/tsc`.
1470
- */
1471
- tsMacro?: boolean;
1472
- /**
1473
- * If `true`, the plugin will launch a separate process for `tsc` or `vue-tsc`.
1474
- * This enables processing multiple projects in parallel.
1475
- */
1294
+ * If `true`, the plugin will launch a separate process for `tsc` or `vue-tsc`.
1295
+ * This enables processing multiple projects in parallel.
1296
+ */
1476
1297
  parallel?: boolean;
1477
1298
  /**
1478
- * If `true`, the plugin will prepare all files listed in `tsconfig.json` for `tsc` or `vue-tsc`.
1479
- *
1480
- * This is especially useful when you have a single `tsconfig.json` for multiple projects in a monorepo.
1481
- */
1299
+ * If `true`, the plugin will prepare all files listed in `tsconfig.json` for `tsc` or `vue-tsc`.
1300
+ *
1301
+ * This is especially useful when you have a single `tsconfig.json` for multiple projects in a monorepo.
1302
+ */
1482
1303
  eager?: boolean;
1483
1304
  /**
1484
- * If `true`, the plugin will create a new isolated context for each build,
1485
- * ensuring that previously generated `.d.ts` code and caches are not reused.
1486
- *
1487
- * By default, the plugin may reuse internal caches or incremental build artifacts
1488
- * to speed up repeated builds. Enabling this option forces a clean context,
1489
- * guaranteeing that all type definitions are generated from scratch.
1490
- *
1491
- * @default false
1492
- */
1305
+ * If `true`, the plugin will create a new isolated context for each build,
1306
+ * ensuring that previously generated `.d.ts` code and caches are not reused.
1307
+ *
1308
+ * By default, the plugin may reuse internal caches or incremental build artifacts
1309
+ * to speed up repeated builds. Enabling this option forces a clean context,
1310
+ * guaranteeing that all type definitions are generated from scratch.
1311
+ *
1312
+ * @default false
1313
+ */
1493
1314
  newContext?: boolean;
1494
1315
  /**
1495
- * If `true`, the plugin will emit `.d.ts` files for `.js` files as well.
1496
- * This is useful when you want to generate type definitions for JavaScript files with JSDoc comments.
1497
- *
1498
- * Enabled by default when `allowJs` in compilerOptions is `true`.
1499
- * This option is only used when {@link Options.oxc} is
1500
- * `false`.
1501
- */
1316
+ * If `true`, the plugin will emit `.d.ts` files for `.js` files as well.
1317
+ * This is useful when you want to generate type definitions for JavaScript files with JSDoc comments.
1318
+ *
1319
+ * Enabled by default when `allowJs` in compilerOptions is `true`.
1320
+ * This option is only used when {@link Options.oxc} is
1321
+ * `false`.
1322
+ */
1502
1323
  emitJs?: boolean;
1503
1324
  }
1504
1325
  interface Options$1 extends GeneralOptions, TscOptions {
1505
1326
  /**
1506
- * If `true`, the plugin will generate `.d.ts` files using Oxc,
1507
- * which is significantly faster than the TypeScript compiler.
1508
- *
1509
- * This option is automatically enabled when `isolatedDeclarations` in `compilerOptions` is set to `true`.
1510
- */
1327
+ * If `true`, the plugin will generate `.d.ts` files using Oxc,
1328
+ * which is significantly faster than the TypeScript compiler.
1329
+ *
1330
+ * This option is automatically enabled when `isolatedDeclarations` in `compilerOptions` is set to `true`.
1331
+ */
1511
1332
  oxc?: boolean | Omit<IsolatedDeclarationsOptions, "sourcemap">;
1512
1333
  /**
1513
- * **[Experimental]** Enables DTS generation using `tsgo`.
1514
- *
1515
- * To use this option, make sure `@typescript/native-preview` is installed as a dependency,
1516
- * or provide a custom path to the `tsgo` binary using the `path` option.
1517
- *
1518
- * **Note:** This option is not yet recommended for production environments.
1519
- * `tsconfigRaw` and `isolatedDeclarations` options will be ignored when this option is enabled.
1520
- *
1521
- *
1522
- * ```ts
1523
- * // Use tsgo from `@typescript/native-preview` dependency
1524
- * tsgo: true
1525
- *
1526
- * // Use custom tsgo path (e.g., managed by Nix)
1527
- * tsgo: { path: '/path/to/tsgo' }
1528
- * ```
1529
- */
1334
+ * **[Experimental]** Enables DTS generation using `tsgo`.
1335
+ *
1336
+ * This is automatically enabled when the TypeScript Go compiler (v7+) is
1337
+ * installed as the `typescript` package. Otherwise, make sure
1338
+ * `@typescript/native-preview` is installed as a dependency, or provide a
1339
+ * custom path to the `tsgo` binary using the `path` option.
1340
+ *
1341
+ * **Note:** TypeScript 7.0 does not yet have a stable API and is experimental.
1342
+ * This option is not yet recommended for production environments, and some
1343
+ * options (such as `tsconfigRaw` and `isolatedDeclarations`) will be
1344
+ * unavailable when it is enabled.
1345
+ *
1346
+ *
1347
+ * ```ts
1348
+ * // Use tsgo from `@typescript/native-preview` dependency
1349
+ * tsgo: true
1350
+ *
1351
+ * // Use custom tsgo path (e.g., managed by Nix)
1352
+ * tsgo: { path: '/path/to/tsgo' }
1353
+ * ```
1354
+ */
1530
1355
  tsgo?: boolean | TsgoOptions;
1356
+ /**
1357
+ * Registers custom {@link https://volarjs.dev Volar} language plugins,
1358
+ * allowing the `tsc` generator to process non-standard file types (such as
1359
+ * `.vue`) when generating `.d.ts` files. Multiple plugins can be provided and
1360
+ * are applied together.
1361
+ *
1362
+ * Enabling this option forces the `tsc` generator and is not supported with
1363
+ * TypeScript 7.0.
1364
+ *
1365
+ * @experimental The API may change in future versions.
1366
+ */
1367
+ volarPlugins?: VolarPlugin[];
1531
1368
  }
1532
1369
  interface TsgoOptions {
1533
- enabled?: boolean;
1534
1370
  /**
1535
- * Custom path to the `tsgo` binary.
1536
- */
1371
+ * Custom path to the `tsgo` binary.
1372
+ */
1537
1373
  path?: string;
1538
1374
  }
1539
1375
  //#endregion
1540
- //#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_b3805a6765df28d505319221a7193e18/node_modules/tsdown/dist/types-F1pJie3k.d.mts
1376
+ //#region ../../node_modules/.pnpm/tsdown@0.22.13_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.13_@tsdown+exe@0.22.13_@t_f26a610f558bef85f3db2230cc877c56/node_modules/tsdown/dist/types-D8DLoC_H.d.mts
1377
+ //#region src/utils/types.d.ts
1378
+ type Overwrite<T, U> = Omit<T, keyof U> & U;
1379
+ type Awaitable<T> = T | Promise<T>;
1380
+ type MarkPartial<T, K extends keyof T> = Omit<Required<T>, K> & Partial<Pick<T, K>>;
1381
+ type Arrayable<T> = T | T[];
1382
+ //#endregion
1541
1383
  //#region src/features/copy.d.ts
1542
1384
  interface CopyEntry {
1543
1385
  /**
1544
- * Source path or glob pattern.
1545
- */
1386
+ * Source path or glob pattern.
1387
+ */
1546
1388
  from: string | string[];
1547
1389
  /**
1548
- * Destination path.
1549
- * If not specified, defaults to the output directory ("outDir").
1550
- */
1390
+ * Destination path.
1391
+ * If not specified, defaults to the output directory ("outDir").
1392
+ */
1551
1393
  to?: string;
1552
1394
  /**
1553
- * Whether to flatten the copied files (not preserving directory structure).
1554
- *
1555
- * @default true
1556
- */
1395
+ * Whether to flatten the copied files (not preserving directory structure).
1396
+ *
1397
+ * @default true
1398
+ */
1557
1399
  flatten?: boolean;
1558
1400
  /**
1559
- * Output copied items to console.
1560
- * @default false
1561
- */
1401
+ * Output copied items to console.
1402
+ * @default false
1403
+ */
1562
1404
  verbose?: boolean;
1563
1405
  /**
1564
- * Change destination file or folder name.
1565
- */
1406
+ * Change destination file or folder name.
1407
+ */
1566
1408
  rename?: string | ((name: string, extension: string, fullPath: string) => string);
1567
1409
  }
1568
1410
  type CopyOptions = Arrayable<string | CopyEntry>;
1569
- type CopyOptionsFn = (options: ResolvedConfig) => Awaitable<CopyOptions>; //#endregion
1411
+ type CopyOptionsFn = (options: ResolvedConfig) => Awaitable<CopyOptions>;
1412
+ //#endregion
1570
1413
  //#region src/utils/chunks.d.ts
1571
1414
  type RolldownChunk = (OutputChunk | OutputAsset) & {
1572
1415
  outDir: string;
@@ -1576,165 +1419,515 @@ interface TsdownBundle extends AsyncDisposable {
1576
1419
  chunks: RolldownChunk[];
1577
1420
  config: ResolvedConfig;
1578
1421
  inlinedDeps: Map<string, Set<string>>;
1579
- } //#endregion
1422
+ }
1423
+ //#endregion
1424
+ //#region src/utils/logger.d.ts
1425
+ type LogType = "error" | "warn" | "info";
1426
+ type LogLevel = LogType | "silent";
1427
+ interface LoggerOptions {
1428
+ allowClearScreen?: boolean;
1429
+ customLogger?: Logger;
1430
+ console?: Console;
1431
+ failOnWarn?: boolean;
1432
+ suppressWarnings?: Arrayable<RegExp | string> | ((msg: string) => boolean);
1433
+ }
1434
+ interface Logger {
1435
+ level: LogLevel;
1436
+ options?: LoggerOptions;
1437
+ info: (...args: any[]) => void;
1438
+ warn: (...args: any[]) => void;
1439
+ warnOnce: (...args: any[]) => void;
1440
+ error: (...args: any[]) => void;
1441
+ success: (...args: any[]) => void;
1442
+ clearScreen: (type: LogType) => void;
1443
+ }
1444
+ declare const globalLogger: Logger;
1445
+ //#endregion
1580
1446
  //#region src/features/deps.d.ts
1581
1447
  type NoExternalFn = (id: string, importer: string | undefined) => boolean | null | undefined | void;
1582
1448
  interface DepsConfig {
1583
1449
  /**
1584
- * Mark dependencies as external (not bundled).
1585
- * Accepts strings, regular expressions, or Rolldown's
1586
- * {@linkcode ExternalOption}.
1587
- */
1588
- neverBundle?: ExternalOption;
1450
+ * Mark dependencies as external (not bundled).
1451
+ * Accepts strings, regular expressions, or Rolldown's
1452
+ * {@linkcode ExternalOption}.
1453
+ *
1454
+ * Set to `true` to externalize **all** dependencies: every import that
1455
+ * follows npm package naming conventions is marked as external as written,
1456
+ * without resolving it. Other non-relative imports (e.g. `#` subpath
1457
+ * imports and path aliases like `~/`) are resolved, and kept external
1458
+ * only if they resolve into `node_modules`; otherwise the resolved local
1459
+ * file is bundled.
1460
+ *
1461
+ * Use {@linkcode alwaysBundle} to opt specific imports back into the bundle.
1462
+ */
1463
+ neverBundle?: true | ExternalOption;
1464
+ /**
1465
+ * Force dependencies to be bundled, even if they are in `dependencies`, `peerDependencies`, or `optionalDependencies`.
1466
+ */
1467
+ alwaysBundle?: Arrayable<string | RegExp> | NoExternalFn;
1468
+ /**
1469
+ * Whitelist of dependencies allowed to be bundled from `node_modules`.
1470
+ * Throws an error if any unlisted dependency is bundled.
1471
+ *
1472
+ * - `undefined` (default): Show warnings for bundled dependencies.
1473
+ * - `false`: Suppress all warnings about bundled dependencies.
1474
+ *
1475
+ * Note: Be sure to include all required sub-dependencies as well.
1476
+ */
1477
+ onlyBundle?: Arrayable<string | RegExp> | false;
1478
+ /**
1479
+ * Whitelist of packages that the emitted output is allowed to import.
1480
+ * Matched against the package name, so subpath imports (e.g. `cac/deno`)
1481
+ * are covered by listing the package (e.g. `cac`).
1482
+ * Node built-in modules are always allowed to be imported
1483
+ * when `platform` is `node`.
1484
+ *
1485
+ * Note: ES imports and dynamic import expressions are checked. CJS
1486
+ * `require` calls are not detected.
1487
+ */
1488
+ onlyImport?: Arrayable<string | RegExp>;
1489
+ /**
1490
+ * @deprecated Use {@linkcode onlyBundle} instead.
1491
+ */
1492
+ onlyAllowBundle?: Arrayable<string | RegExp> | false;
1493
+ /**
1494
+ * Skip bundling all `node_modules` dependencies.
1495
+ *
1496
+ * **Note:** This option cannot be used together with {@linkcode alwaysBundle}.
1497
+ *
1498
+ * @default false
1499
+ * @deprecated Use {@linkcode neverBundle | neverBundle: true} instead.
1500
+ */
1501
+ skipNodeModulesBundle?: boolean;
1502
+ /**
1503
+ * Resolve dependency subpath imports to their actual package-relative paths
1504
+ * when externalizing packages without an `exports` field.
1505
+ *
1506
+ * @default true
1507
+ */
1508
+ resolveDepSubpath?: boolean;
1509
+ /**
1510
+ * Override dependency bundling options for declaration file generation.
1511
+ */
1512
+ dts?: Pick<DepsConfig, "alwaysBundle" | "neverBundle">;
1513
+ }
1514
+ interface ResolvedDepsConfig extends Pick<DepsConfig, "neverBundle" | "skipNodeModulesBundle" | "resolveDepSubpath"> {
1515
+ alwaysBundle?: NoExternalFn;
1516
+ onlyBundle?: Array<string | RegExp> | false;
1517
+ onlyImport?: Array<string | RegExp>;
1518
+ /**
1519
+ * Override dependency bundling options for declaration file generation.
1520
+ */
1521
+ dts: Pick<ResolvedDepsConfig, "alwaysBundle" | "neverBundle">;
1522
+ }
1523
+ //#endregion
1524
+ //#region src/features/devtools.d.ts
1525
+ interface DevtoolsOptions extends NonNullable<InputOptions["devtools"]> {
1526
+ /**
1527
+ * **[experimental]** Enable devtools integration. `@vitejs/devtools` must be installed as a dependency.
1528
+ *
1529
+ * Defaults to true, if `@vitejs/devtools` is installed.
1530
+ */
1531
+ ui?: boolean | Partial<StartOptions>;
1532
+ /**
1533
+ * Clean devtools stale sessions.
1534
+ *
1535
+ * @default true
1536
+ */
1537
+ clean?: boolean;
1538
+ }
1539
+ interface ExeOptions extends ExeExtensionOptions {
1540
+ seaConfig?: Omit<SeaConfig, "main" | "output" | "mainFormat">;
1541
+ /**
1542
+ * Output file name without any suffix or extension.
1543
+ * For example, do not include `.exe`, platform suffixes, or architecture suffixes.
1544
+ */
1545
+ fileName?: string | ((chunk: RolldownChunk) => string);
1546
+ /**
1547
+ * Output directory for executables.
1548
+ * @default 'build'
1549
+ */
1550
+ outDir?: string;
1551
+ }
1552
+ /**
1553
+ * See also [Node.js SEA Documentation](https://nodejs.org/api/single-executable-applications.html#generating-single-executable-applications-with---build-sea)
1554
+ *
1555
+ * Note some default values are different from Node.js defaults to optimize for typical use cases (e.g. disabling experimental warning, enabling code cache). These can be overridden.
1556
+ */
1557
+ interface SeaConfig {
1558
+ main?: string;
1559
+ /**
1560
+ * Optional, if not specified, uses the current Node.js binary
1561
+ */
1562
+ executable?: string;
1563
+ output?: string;
1564
+ /**
1565
+ * @default tsdownConfig.format === 'es' ? 'module' : 'commonjs'
1566
+ */
1567
+ mainFormat?: "commonjs" | "module";
1568
+ /**
1569
+ * @default true
1570
+ */
1571
+ disableExperimentalSEAWarning?: boolean;
1572
+ /**
1573
+ * @default false
1574
+ */
1575
+ useSnapshot?: boolean;
1576
+ /**
1577
+ * @default false
1578
+ */
1579
+ useCodeCache?: boolean;
1580
+ execArgv?: string[];
1581
+ /**
1582
+ * @default 'env'
1583
+ */
1584
+ execArgvExtension?: "none" | "env" | "cli";
1585
+ assets?: Record<string, string>;
1586
+ }
1587
+ //#endregion
1588
+ //#region src/features/hooks.d.ts
1589
+ interface BuildContext {
1590
+ options: ResolvedConfig;
1591
+ hooks: Hookable<TsdownHooks>;
1592
+ }
1593
+ interface RolldownContext {
1594
+ buildOptions: BuildOptions;
1595
+ }
1596
+ /**
1597
+ * Hooks for tsdown.
1598
+ */
1599
+ interface TsdownHooks {
1600
+ /**
1601
+ * Invoked before each tsdown build starts.
1602
+ * Use this hook to perform setup or preparation tasks.
1603
+ */
1604
+ "build:prepare": (ctx: BuildContext) => void | Promise<void>;
1605
+ /**
1606
+ * Invoked before each Rolldown build.
1607
+ * For dual-format builds, this hook is called for each format.
1608
+ * Useful for configuring or modifying the build context before bundling.
1609
+ */
1610
+ "build:before": (ctx: BuildContext & RolldownContext) => void | Promise<void>;
1611
+ /**
1612
+ * Invoked after each tsdown build completes.
1613
+ * Use this hook for cleanup or post-processing tasks.
1614
+ */
1615
+ "build:done": (ctx: BuildContext & {
1616
+ chunks: RolldownChunk[];
1617
+ }) => void | Promise<void>;
1618
+ }
1619
+ //#endregion
1620
+ //#region node_modules/.pnpm/pkg-types@2.3.1/node_modules/pkg-types/dist/index.d.mts
1621
+ //#endregion
1622
+ //#region src/packagejson/types.d.ts
1623
+ interface PackageJson {
1624
+ /**
1625
+ * The name is what your thing is called.
1626
+ * Some rules:
1627
+ * - The name must be less than or equal to 214 characters. This includes the scope for scoped packages.
1628
+ * - The name can’t start with a dot or an underscore.
1629
+ * - New packages must not have uppercase letters in the name.
1630
+ * - The name ends up being part of a URL, an argument on the command line, and a folder name. Therefore, the name can’t contain any non-URL-safe characters.
1631
+ */
1632
+ name?: string;
1633
+ /**
1634
+ * Version must be parseable by `node-semver`, which is bundled with npm as a dependency. (`npm install semver` to use it yourself.)
1635
+ */
1636
+ version?: string;
1637
+ /**
1638
+ * Put a description in it. It’s a string. This helps people discover your package, as it’s listed in `npm search`.
1639
+ */
1640
+ description?: string;
1641
+ /**
1642
+ * Put keywords in it. It’s an array of strings. This helps people discover your package as it’s listed in `npm search`.
1643
+ */
1644
+ keywords?: string[];
1645
+ /**
1646
+ * The url to the project homepage.
1647
+ */
1648
+ homepage?: string;
1649
+ /**
1650
+ * The url to your project’s issue tracker and / or the email address to which issues should be reported. These are helpful for people who encounter issues with your package.
1651
+ */
1652
+ bugs?: string | {
1653
+ url?: string;
1654
+ email?: string;
1655
+ };
1656
+ /**
1657
+ * You should specify a license for your package so that people know how they are permitted to use it, and any restrictions you’re placing on it.
1658
+ */
1659
+ license?: string;
1660
+ /**
1661
+ * Specify the place where your code lives. This is helpful for people who want to contribute. If the git repo is on GitHub, then the `npm docs` command will be able to find you.
1662
+ * For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same shortcut syntax you use for npm install:
1663
+ */
1664
+ repository?: string | {
1665
+ type: string;
1666
+ url: string;
1667
+ /**
1668
+ * If the `package.json` for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives:
1669
+ */
1670
+ directory?: string;
1671
+ };
1672
+ /**
1673
+ * The `scripts` field is a dictionary containing script commands that are run at various times in the lifecycle of your package.
1674
+ */
1675
+ scripts?: PackageJsonScripts;
1676
+ /**
1677
+ * If you set `"private": true` in your package.json, then npm will refuse to publish it.
1678
+ */
1679
+ private?: boolean;
1680
+ /**
1681
+ * The “author” is one person.
1682
+ */
1683
+ author?: PackageJsonPerson;
1684
+ /**
1685
+ * “contributors” is an array of people.
1686
+ */
1687
+ contributors?: PackageJsonPerson[];
1688
+ /**
1689
+ * An object containing a URL that provides up-to-date information
1690
+ * about ways to help fund development of your package,
1691
+ * a string URL, or an array of objects and string URLs
1692
+ */
1693
+ funding?: PackageJsonFunding | PackageJsonFunding[];
1694
+ /**
1695
+ * The optional `files` field is an array of file patterns that describes the entries to be included when your package is installed as a dependency. File patterns follow a similar syntax to `.gitignore`, but reversed: including a file, directory, or glob pattern (`*`, `**\/*`, and such) will make it so that file is included in the tarball when it’s packed. Omitting the field will make it default to `["*"]`, which means it will include all files.
1696
+ */
1697
+ files?: string[];
1698
+ /**
1699
+ * The main field is a module ID that is the primary entry point to your program. That is, if your package is named `foo`, and a user installs it, and then does `require("foo")`, then your main module’s exports object will be returned.
1700
+ * This should be a module ID relative to the root of your package folder.
1701
+ * For most modules, it makes the most sense to have a main script and often not much else.
1702
+ */
1703
+ main?: string;
1704
+ /**
1705
+ * If your module is meant to be used client-side the browser field should be used instead of the main field. This is helpful to hint users that it might rely on primitives that aren’t available in Node.js modules. (e.g. window)
1706
+ */
1707
+ browser?: string | Record<string, string | false>;
1708
+ /**
1709
+ * The `unpkg` field is used to specify the URL to a UMD module for your package. This is used by default in the unpkg.com CDN service.
1710
+ */
1711
+ unpkg?: string;
1712
+ /**
1713
+ * A map of command name to local file name. On install, npm will symlink that file into `prefix/bin` for global installs, or `./node_modules/.bin/` for local installs.
1714
+ */
1715
+ bin?: string | Record<string, string>;
1716
+ /**
1717
+ * Specify either a single file or an array of filenames to put in place for the `man` program to find.
1718
+ */
1719
+ man?: string | string[];
1589
1720
  /**
1590
- * Force dependencies to be bundled, even if they are in `dependencies`, `peerDependencies`, or `optionalDependencies`.
1591
- */
1592
- alwaysBundle?: Arrayable<string | RegExp> | NoExternalFn;
1721
+ * Dependencies are specified in a simple object that maps a package name to a version range. The version range is a string which has one or more space-separated descriptors. Dependencies can also be identified with a tarball or git URL.
1722
+ */
1723
+ dependencies?: Record<string, string>;
1593
1724
  /**
1594
- * Whitelist of dependencies allowed to be bundled from `node_modules`.
1595
- * Throws an error if any unlisted dependency is bundled.
1596
- *
1597
- * - `undefined` (default): Show warnings for bundled dependencies.
1598
- * - `false`: Suppress all warnings about bundled dependencies.
1599
- *
1600
- * Note: Be sure to include all required sub-dependencies as well.
1601
- */
1602
- onlyBundle?: Arrayable<string | RegExp> | false;
1725
+ * If someone is planning on downloading and using your module in their program, then they probably don’t want or need to download and build the external test or documentation framework that you use.
1726
+ * In this case, it’s best to map these additional items in a `devDependencies` object.
1727
+ */
1728
+ devDependencies?: Record<string, string>;
1603
1729
  /**
1604
- * @deprecated Use {@linkcode onlyBundle} instead.
1605
- */
1606
- onlyAllowBundle?: Arrayable<string | RegExp> | false;
1730
+ * If a dependency can be used, but you would like npm to proceed if it cannot be found or fails to install, then you may put it in the `optionalDependencies` object. This is a map of package name to version or url, just like the `dependencies` object. The difference is that build failures do not cause installation to fail.
1731
+ */
1732
+ optionalDependencies?: Record<string, string>;
1607
1733
  /**
1608
- * Skip bundling all `node_modules` dependencies.
1609
- *
1610
- * **Note:** This option cannot be used together with {@linkcode alwaysBundle}.
1611
- *
1612
- * @default false
1613
- */
1614
- skipNodeModulesBundle?: boolean;
1734
+ * In some cases, you want to express the compatibility of your package with a host tool or library, while not necessarily doing a `require` of this host. This is usually referred to as a plugin. Notably, your module may be exposing a specific interface, expected and specified by the host documentation.
1735
+ */
1736
+ peerDependencies?: Record<string, string>;
1615
1737
  /**
1616
- * Override dependency bundling options for declaration file generation.
1617
- */
1618
- dts?: Pick<DepsConfig, "alwaysBundle" | "neverBundle">;
1619
- }
1620
- interface ResolvedDepsConfig {
1621
- neverBundle?: ExternalOption;
1622
- alwaysBundle?: NoExternalFn;
1623
- onlyBundle?: Array<string | RegExp> | false;
1624
- skipNodeModulesBundle: boolean;
1738
+ * TypeScript typings, typically ending by `.d.ts`.
1739
+ */
1740
+ types?: string;
1625
1741
  /**
1626
- * Override dependency bundling options for declaration file generation.
1627
- */
1628
- dts: Pick<ResolvedDepsConfig, "alwaysBundle" | "neverBundle">;
1629
- }
1630
- //#endregion
1631
- //#region src/features/devtools.d.ts
1632
- interface DevtoolsOptions extends NonNullable<InputOptions["devtools"]> {
1742
+ * This field is synonymous with `types`.
1743
+ */
1744
+ typings?: string;
1633
1745
  /**
1634
- * **[experimental]** Enable devtools integration. `@vitejs/devtools` must be installed as a dependency.
1635
- *
1636
- * Defaults to true, if `@vitejs/devtools` is installed.
1637
- */
1638
- ui?: boolean | Partial<StartOptions>;
1746
+ * Non-Standard Node.js alternate entry-point to main.
1747
+ * An initial implementation for supporting CJS packages (from main), and use module for ESM modules.
1748
+ */
1749
+ module?: string;
1639
1750
  /**
1640
- * Clean devtools stale sessions.
1641
- *
1642
- * @default true
1643
- */
1644
- clean?: boolean;
1645
- } //#endregion
1646
- //#region src/features/exe.d.ts
1647
- interface ExeOptions extends ExeExtensionOptions {
1648
- seaConfig?: Omit<SeaConfig, "main" | "output" | "mainFormat">;
1751
+ * Make main entry-point be loaded as an ESM module, support "export" syntax instead of "require"
1752
+ *
1753
+ * Docs:
1754
+ * - https://nodejs.org/docs/latest-v14.x/api/esm.html#esm_package_json_type_field
1755
+ *
1756
+ * @default 'commonjs'
1757
+ * @since Node.js v14
1758
+ */
1759
+ type?: "module" | "commonjs";
1649
1760
  /**
1650
- * Output file name without any suffix or extension.
1651
- * For example, do not include `.exe`, platform suffixes, or architecture suffixes.
1652
- */
1653
- fileName?: string | ((chunk: RolldownChunk) => string);
1761
+ * Alternate and extensible alternative to "main" entry point.
1762
+ *
1763
+ * When using `{type: "module"}`, any ESM module file MUST end with `.mjs` extension.
1764
+ *
1765
+ * Docs:
1766
+ * - https://nodejs.org/docs/latest-v14.x/api/esm.html#esm_exports_sugar
1767
+ *
1768
+ * @since Node.js v12.7
1769
+ */
1770
+ exports?: PackageJsonExports;
1654
1771
  /**
1655
- * Output directory for executables.
1656
- * @default 'build'
1657
- */
1658
- outDir?: string;
1659
- }
1660
- /**
1661
- * See also [Node.js SEA Documentation](https://nodejs.org/api/single-executable-applications.html#generating-single-executable-applications-with---build-sea)
1662
- *
1663
- * Note some default values are different from Node.js defaults to optimize for typical use cases (e.g. disabling experimental warning, enabling code cache). These can be overridden.
1664
- */
1665
- interface SeaConfig {
1666
- main?: string;
1772
+ * Docs:
1773
+ * - https://nodejs.org/api/packages.html#imports
1774
+ */
1775
+ imports?: Record<string, string | Record<string, string>>;
1667
1776
  /**
1668
- * Optional, if not specified, uses the current Node.js binary
1669
- */
1670
- executable?: string;
1671
- output?: string;
1777
+ * The field is used to define a set of sub-packages (or workspaces) within a monorepo.
1778
+ *
1779
+ * This field is an array of glob patterns or an object with specific configurations for managing
1780
+ * multiple packages in a single repository.
1781
+ */
1782
+ workspaces?: string[] | {
1783
+ /**
1784
+ * Workspace package paths. Glob patterns are supported.
1785
+ */
1786
+ packages?: string[];
1787
+ /**
1788
+ * Packages to block from hoisting to the workspace root.
1789
+ * Uses glob patterns to match module paths in the dependency tree.
1790
+ *
1791
+ * Docs:
1792
+ * - https://classic.yarnpkg.com/blog/2018/02/15/nohoist/
1793
+ */
1794
+ nohoist?: string[];
1795
+ };
1672
1796
  /**
1673
- * @default tsdownConfig.format === 'es' ? 'module' : 'commonjs'
1674
- */
1675
- mainFormat?: "commonjs" | "module";
1797
+ * The field is used to specify different TypeScript declaration files for
1798
+ * different versions of TypeScript, allowing for version-specific type definitions.
1799
+ */
1800
+ typesVersions?: Record<string, Record<string, string[]>>;
1676
1801
  /**
1677
- * @default true
1678
- */
1679
- disableExperimentalSEAWarning?: boolean;
1802
+ * You can specify which operating systems your module will run on:
1803
+ * ```json
1804
+ * {
1805
+ * "os": ["darwin", "linux"]
1806
+ * }
1807
+ * ```
1808
+ * You can also block instead of allowing operating systems, just prepend the blocked os with a '!':
1809
+ * ```json
1810
+ * {
1811
+ * "os": ["!win32"]
1812
+ * }
1813
+ * ```
1814
+ * The host operating system is determined by `process.platform`
1815
+ * It is allowed to both block and allow an item, although there isn't any good reason to do this.
1816
+ */
1817
+ os?: string[];
1680
1818
  /**
1681
- * @default false
1682
- */
1683
- useSnapshot?: boolean;
1819
+ * If your code only runs on certain cpu architectures, you can specify which ones.
1820
+ * ```json
1821
+ * {
1822
+ * "cpu": ["x64", "ia32"]
1823
+ * }
1824
+ * ```
1825
+ * Like the `os` option, you can also block architectures:
1826
+ * ```json
1827
+ * {
1828
+ * "cpu": ["!arm", "!mips"]
1829
+ * }
1830
+ * ```
1831
+ * The host architecture is determined by `process.arch`
1832
+ */
1833
+ cpu?: string[];
1684
1834
  /**
1685
- * @default false
1686
- */
1687
- useCodeCache?: boolean;
1688
- execArgv?: string[];
1835
+ * This is a set of config values that will be used at publish-time.
1836
+ */
1837
+ publishConfig?: {
1838
+ /**
1839
+ * The registry that will be used if the package is published.
1840
+ */
1841
+ registry?: string;
1842
+ /**
1843
+ * The tag that will be used if the package is published.
1844
+ */
1845
+ tag?: string;
1846
+ /**
1847
+ * The access level that will be used if the package is published.
1848
+ */
1849
+ access?: "public" | "restricted";
1850
+ /**
1851
+ * **pnpm-only**
1852
+ *
1853
+ * By default, for portability reasons, no files except those listed in
1854
+ * the bin field will be marked as executable in the resulting package
1855
+ * archive. The executableFiles field lets you declare additional fields
1856
+ * that must have the executable flag (+x) set even if
1857
+ * they aren't directly accessible through the bin field.
1858
+ */
1859
+ executableFiles?: string[];
1860
+ /**
1861
+ * **pnpm-only**
1862
+ *
1863
+ * You also can use the field `publishConfig.directory` to customize
1864
+ * the published subdirectory relative to the current `package.json`.
1865
+ *
1866
+ * It is expected to have a modified version of the current package in
1867
+ * the specified directory (usually using third party build tools).
1868
+ */
1869
+ directory?: string;
1870
+ /**
1871
+ * **pnpm-only**
1872
+ *
1873
+ * When set to `true`, the project will be symlinked from the
1874
+ * `publishConfig.directory` location during local development.
1875
+ * @default true
1876
+ */
1877
+ linkDirectory?: boolean;
1878
+ } & Pick<PackageJson, "bin" | "main" | "exports" | "types" | "typings" | "module" | "browser" | "unpkg" | "typesVersions" | "os" | "cpu">;
1689
1879
  /**
1690
- * @default 'env'
1691
- */
1692
- execArgvExtension?: "none" | "env" | "cli";
1693
- assets?: Record<string, string>;
1694
- } //#endregion
1695
- //#region src/features/hooks.d.ts
1696
- interface BuildContext {
1697
- options: ResolvedConfig;
1698
- hooks: Hookable<TsdownHooks>;
1699
- }
1700
- interface RolldownContext {
1701
- buildOptions: BuildOptions;
1880
+ * See: https://nodejs.org/api/packages.html#packagemanager
1881
+ * This field defines which package manager is expected to be used when working on the current project.
1882
+ * Should be of the format: `<name>@<version>[#hash]`
1883
+ */
1884
+ packageManager?: string;
1885
+ [key: string]: any;
1702
1886
  }
1703
1887
  /**
1704
- * Hooks for tsdown.
1705
- */
1706
- interface TsdownHooks {
1707
- /**
1708
- * Invoked before each tsdown build starts.
1709
- * Use this hook to perform setup or preparation tasks.
1710
- */
1711
- "build:prepare": (ctx: BuildContext) => void | Promise<void>;
1712
- /**
1713
- * Invoked before each Rolldown build.
1714
- * For dual-format builds, this hook is called for each format.
1715
- * Useful for configuring or modifying the build context before bundling.
1716
- */
1717
- "build:before": (ctx: BuildContext & RolldownContext) => void | Promise<void>;
1718
- /**
1719
- * Invoked after each tsdown build completes.
1720
- * Use this hook for cleanup or post-processing tasks.
1721
- */
1722
- "build:done": (ctx: BuildContext & {
1723
- chunks: RolldownChunk[];
1724
- }) => void | Promise<void>;
1725
- } //#endregion
1888
+ * See: https://docs.npmjs.com/cli/v11/using-npm/scripts#pre--post-scripts
1889
+ */
1890
+ type PackageJsonScriptWithPreAndPost<S extends string> = S | `${"pre" | "post"}${S}`;
1891
+ /**
1892
+ * See: https://docs.npmjs.com/cli/v11/using-npm/scripts#life-cycle-operation-order
1893
+ */
1894
+ type PackageJsonNpmLifeCycleScripts = "dependencies" | "prepublishOnly" | PackageJsonScriptWithPreAndPost<"install" | "pack" | "prepare" | "publish" | "restart" | "start" | "stop" | "test" | "version">;
1895
+ /**
1896
+ * See: https://pnpm.io/scripts#lifecycle-scripts
1897
+ */
1898
+ type PackageJsonPnpmLifeCycleScripts = "pnpm:devPreinstall";
1899
+ type PackageJsonCommonScripts = "build" | "coverage" | "deploy" | "dev" | "format" | "lint" | "preview" | "release" | "typecheck" | "watch";
1900
+ type PackageJsonScriptName = PackageJsonCommonScripts | PackageJsonNpmLifeCycleScripts | PackageJsonPnpmLifeCycleScripts | (string & {});
1901
+ type PackageJsonScripts = { [P in PackageJsonScriptName]?: string; };
1902
+ /**
1903
+ * A “person” is an object with a “name” field and optionally “url” and “email”. Or you can shorten that all into a single string, and npm will parse it for you.
1904
+ */
1905
+ type PackageJsonPerson = string | {
1906
+ name: string;
1907
+ email?: string;
1908
+ url?: string;
1909
+ };
1910
+ type PackageJsonFunding = string | {
1911
+ url: string;
1912
+ type?: string;
1913
+ };
1914
+ type PackageJsonExportKey = "." | "import" | "require" | "types" | "node" | "browser" | "default" | (string & {});
1915
+ type PackageJsonExportsObject = { [P in PackageJsonExportKey]?: string | PackageJsonExportsObject | Array<string | PackageJsonExportsObject>; };
1916
+ type PackageJsonExports = string | PackageJsonExportsObject | Array<string | PackageJsonExportsObject>;
1917
+ //#endregion
1726
1918
  //#region src/utils/package.d.ts
1727
1919
  interface PackageJsonWithPath extends PackageJson {
1728
1920
  packageJsonPath: string;
1729
1921
  }
1730
- type PackageType = "module" | "commonjs" | undefined; //#endregion
1922
+ type PackageType = "module" | "commonjs" | undefined;
1923
+ //#endregion
1731
1924
  //#region src/features/output.d.ts
1732
1925
  interface OutExtensionContext {
1733
1926
  options: InputOptions;
1734
1927
  format: NormalizedFormat;
1735
1928
  /**
1736
- * `"type"` field in project's `package.json`.
1737
- */
1929
+ * `"type"` field in project's `package.json`.
1930
+ */
1738
1931
  pkgType?: PackageType;
1739
1932
  }
1740
1933
  interface OutExtensionObject {
@@ -1751,856 +1944,869 @@ type ChunkAddonFunction = (ctx: {
1751
1944
  format: Format;
1752
1945
  fileName: string;
1753
1946
  }) => ChunkAddonObject | string | undefined;
1754
- type ChunkAddon = ChunkAddonObject | ChunkAddonFunction | string; //#endregion
1947
+ type ChunkAddon = ChunkAddonObject | ChunkAddonFunction | string;
1948
+ //#endregion
1755
1949
  //#region src/features/pkg/attw.d.ts
1756
1950
  interface AttwOptions extends CheckPackageOptions {
1757
1951
  module?: typeof import("@arethetypeswrong/core");
1758
1952
  /**
1759
- * Profiles select a set of resolution modes to require/ignore. All are evaluated but failures outside
1760
- * of those required are ignored.
1761
- *
1762
- * The available profiles are:
1763
- * - `strict`: requires all resolutions
1764
- * - `node16`: ignores node10 resolution failures
1765
- * - `esm-only`: ignores CJS resolution failures
1766
- *
1767
- * @default 'strict'
1768
- */
1953
+ * Profiles select a set of resolution modes to require/ignore. All are evaluated but failures outside
1954
+ * of those required are ignored.
1955
+ *
1956
+ * The available profiles are:
1957
+ * - `strict`: requires all resolutions
1958
+ * - `node16`: ignores node10 resolution failures
1959
+ * - `esm-only`: ignores CJS resolution failures
1960
+ *
1961
+ * @default 'strict'
1962
+ */
1769
1963
  profile?: "strict" | "node16" | "esm-only";
1770
1964
  /**
1771
- * The level of the check.
1772
- *
1773
- * The available levels are:
1774
- * - `error`: fails the build
1775
- * - `warn`: warns the build
1776
- *
1777
- * @default 'warn'
1778
- */
1965
+ * The level of the check.
1966
+ *
1967
+ * The available levels are:
1968
+ * - `error`: fails the build
1969
+ * - `warn`: warns the build
1970
+ *
1971
+ * @default 'warn'
1972
+ */
1779
1973
  level?: "error" | "warn";
1780
1974
  /**
1781
- * List of problem types to ignore by rule name.
1782
- *
1783
- * The available values are:
1784
- * - `no-resolution`
1785
- * - `untyped-resolution`
1786
- * - `false-cjs`
1787
- * - `false-esm`
1788
- * - `cjs-resolves-to-esm`
1789
- * - `fallback-condition`
1790
- * - `cjs-only-exports-default`
1791
- * - `named-exports`
1792
- * - `false-export-default`
1793
- * - `missing-export-equals`
1794
- * - `unexpected-module-syntax`
1795
- * - `internal-resolution-error`
1796
- *
1797
- * @example
1798
- * ```ts
1799
- * ignoreRules: ['no-resolution', 'false-cjs']
1800
- * ```
1801
- *
1802
- * @default []
1803
- *
1804
- * @uniqueItems
1805
- */
1975
+ * List of problem types to ignore by rule name.
1976
+ *
1977
+ * The available values are:
1978
+ * - `no-resolution`
1979
+ * - `untyped-resolution`
1980
+ * - `false-cjs`
1981
+ * - `false-esm`
1982
+ * - `cjs-resolves-to-esm`
1983
+ * - `fallback-condition`
1984
+ * - `cjs-only-exports-default`
1985
+ * - `named-exports`
1986
+ * - `false-export-default`
1987
+ * - `missing-export-equals`
1988
+ * - `unexpected-module-syntax`
1989
+ * - `internal-resolution-error`
1990
+ *
1991
+ * @example
1992
+ * ```ts
1993
+ * ignoreRules: ['no-resolution', 'false-cjs']
1994
+ * ```
1995
+ *
1996
+ * @default []
1997
+ *
1998
+ * @uniqueItems
1999
+ */
1806
2000
  ignoreRules?: ("no-resolution" | "untyped-resolution" | "false-cjs" | "false-esm" | "cjs-resolves-to-esm" | "fallback-condition" | "cjs-only-exports-default" | "named-exports" | "false-export-default" | "missing-export-equals" | "unexpected-module-syntax" | "internal-resolution-error" | (string & {}))[];
1807
- } //#endregion
2001
+ }
2002
+ //#endregion
1808
2003
  //#region src/features/pkg/exports.d.ts
1809
2004
  interface ExportsOptions {
1810
2005
  /**
1811
- * Generate exports that link to source code during development.
1812
- * - `string`: add as a custom condition.
1813
- * - `true`: all conditions point to source files, and add `dist` exports to `publishConfig`.
1814
- */
2006
+ * Generate exports that link to source code during development.
2007
+ * - `string`: add as a custom condition.
2008
+ * - `true`: all conditions point to source files, and add `dist` exports to `publishConfig`.
2009
+ */
1815
2010
  devExports?: boolean | string;
1816
2011
  /**
1817
- * Generate `exports` for `package.json` file.
1818
- *
1819
- * @example
1820
- * ```json
1821
- * {
1822
- * "exports": {
1823
- * ".": {
1824
- * "types": "./dist/index.d.mts",
1825
- * "import": "./dist/index.mjs"
1826
- * },
1827
- * "./package.json": "./package.json"
1828
- * }
1829
- * }
1830
- * ```
1831
- *
1832
- * @default true
1833
- */
2012
+ * Generate `exports` for `package.json` file.
2013
+ *
2014
+ * @example
2015
+ * ```json
2016
+ * {
2017
+ * "exports": {
2018
+ * ".": {
2019
+ * "types": "./dist/index.d.mts",
2020
+ * "import": "./dist/index.mjs"
2021
+ * },
2022
+ * "./package.json": "./package.json"
2023
+ * }
2024
+ * }
2025
+ * ```
2026
+ *
2027
+ * @default true
2028
+ */
1834
2029
  packageJson?: boolean;
1835
2030
  /**
1836
- * Generate `exports` for all files.
1837
- *
1838
- * @example
1839
- * ```json
1840
- * {
1841
- * "exports": {
1842
- * "./*": "./*"
1843
- * }
1844
- * }
1845
- * ```
1846
- *
1847
- * @default false
1848
- */
2031
+ * Generate `exports` for all files.
2032
+ *
2033
+ * @example
2034
+ * ```json
2035
+ * {
2036
+ * "exports": {
2037
+ * "./*": "./*"
2038
+ * }
2039
+ * }
2040
+ * ```
2041
+ *
2042
+ * @default false
2043
+ */
1849
2044
  all?: boolean;
1850
2045
  /**
1851
- * Specifies file patterns (as glob patterns or regular expressions) to exclude from package exports.
1852
- * Use this to prevent certain files from being included in the exported package, such as test files, binaries, or internal utilities.
1853
- *
1854
- * **Note:** Do not include file extensions, and paths should be relative to the dist directory.
1855
- *
1856
- * @example
1857
- * ```ts
1858
- * exclude: ['cli', '**\/*.test', /internal/]
1859
- * ```
1860
- */
2046
+ * Specifies file patterns (as glob patterns or regular expressions) to exclude from package exports.
2047
+ * Use this to prevent certain files from being included in the exported package, such as test files, binaries, or internal utilities.
2048
+ *
2049
+ * **Note:** Do not include file extensions, and paths should be relative to the dist directory.
2050
+ *
2051
+ * @example
2052
+ * ```ts
2053
+ * exclude: ['cli', '**\/*.test', /internal/]
2054
+ * ```
2055
+ */
1861
2056
  exclude?: (RegExp | string)[];
1862
2057
  /**
1863
- * Generate legacy fields (`main` and `module`) for older Node.js and bundlers
1864
- * that do not support package `exports` field.
1865
- *
1866
- * Defaults to false, if only ESM builds are included, true otherwise.
1867
- *
1868
- * @see {@link https://github.com/publint/publint/issues/24}
1869
- */
2058
+ * Generate legacy fields (`main` and `module`) for older Node.js and bundlers
2059
+ * that do not support package `exports` field.
2060
+ *
2061
+ * Defaults to false, if only ESM builds are included, true otherwise.
2062
+ *
2063
+ * @see {@link https://github.com/publint/publint/issues/24}
2064
+ */
1870
2065
  legacy?: boolean;
1871
2066
  /**
1872
- * Specifies custom exports to add to the package exports in addition to the ones generated by tsdown.
1873
- * Use this to add additional exports in the exported package, such as workers or assets.
1874
- *
1875
- * @example
1876
- * ```ts
1877
- * customExports(exports) {
1878
- * exports['./worker.js'] = './dist/worker.js';
1879
- * return exports;
1880
- * }
1881
- * ```
1882
- *
1883
- * @example
1884
- * ```jsonc
1885
- * {
1886
- * "customExports": {
1887
- * "./worker.js": {
1888
- * "types": "./dist/worker.d.ts",
1889
- * "default": "./dist/worker.js"
1890
- * }
1891
- * }
1892
- * }
1893
- * ```
1894
- */
2067
+ * Specifies custom exports to add to the package exports in addition to the ones generated by tsdown.
2068
+ * Use this to add additional exports in the exported package, such as workers or assets.
2069
+ *
2070
+ * @example
2071
+ * ```ts
2072
+ * customExports(exports) {
2073
+ * exports['./worker.js'] = './dist/worker.js';
2074
+ * return exports;
2075
+ * }
2076
+ * ```
2077
+ *
2078
+ * @example
2079
+ * ```jsonc
2080
+ * {
2081
+ * "customExports": {
2082
+ * "./worker.js": {
2083
+ * "types": "./dist/worker.d.ts",
2084
+ * "default": "./dist/worker.js"
2085
+ * }
2086
+ * }
2087
+ * }
2088
+ * ```
2089
+ */
1895
2090
  customExports?: Record<string, any> | ((exports: Record<string, any>, context: {
1896
2091
  pkg: PackageJson;
1897
2092
  chunks: ChunksByFormat;
1898
2093
  isPublish: boolean;
1899
2094
  }) => Awaitable<Record<string, any>>);
1900
2095
  /**
1901
- * Generate `inlinedDependencies` field in `package.json`.
1902
- * Lists dependencies that are physically inlined into the bundle with their exact versions.
1903
- *
1904
- * @default true
1905
- * @see {@link https://github.com/e18e/ecosystem-issues/issues/237}
1906
- */
2096
+ * Generate `inlinedDependencies` field in `package.json`.
2097
+ * Lists dependencies that are physically inlined into the bundle with their exact versions.
2098
+ *
2099
+ * @default true
2100
+ * @see {@link https://github.com/e18e/ecosystem-issues/issues/237}
2101
+ */
1907
2102
  inlinedDependencies?: boolean;
1908
2103
  /**
1909
- * Add file extensions to subpath export keys.
1910
- *
1911
- * When enabled, all subpath exports (except the root `"."`) will include
1912
- * a `.js` extension in the key (e.g., `"./utils.js"` instead of `"./utils"`).
1913
- *
1914
- * This follows the Node.js recommendation for subpath exports:
1915
- * @see {@link https://nodejs.org/api/packages.html#extensions-in-subpaths}
1916
- *
1917
- * @default false
1918
- */
2104
+ * Add file extensions to subpath export keys.
2105
+ *
2106
+ * When enabled, all subpath exports (except the root `"."`) will include
2107
+ * a `.js` extension in the key (e.g., `"./utils.js"` instead of `"./utils"`).
2108
+ *
2109
+ * This follows the Node.js recommendation for subpath exports:
2110
+ * @see {@link https://nodejs.org/api/packages.html#extensions-in-subpaths}
2111
+ *
2112
+ * @default false
2113
+ */
1919
2114
  extensions?: boolean;
1920
2115
  /**
1921
- * Generate the `bin` field in `package.json` for CLI executables.
1922
- *
1923
- * Behavior depends on the value:
1924
- *
1925
- * - *Unset* (default): Soft auto-detect. Scans entry chunks for shebangs
1926
- * (e.g. `#!/usr/bin/env node`). If exactly one is found, it is used as
1927
- * the bin entry. If multiple are found, a warning is shown and no `bin`
1928
- * field is written. If none are found, nothing happens silently.
1929
- * - `true`: Strict auto-detect. Same as the default, but throws if
1930
- * multiple shebang entries are found, and warns if none are found.
1931
- * Use this when your package is known to ship a CLI and you want to
1932
- * fail fast on misconfiguration.
1933
- * - `false`: Disable bin generation entirely, even if shebangs are
1934
- * present.
1935
- * - `string`: Use the given source file path (relative to `cwd`) as the
1936
- * CLI entry. The command name is derived from the package name without
1937
- * its scope. Warns if the source file does not contain a shebang.
1938
- * - `Record<string, string>`: Explicitly map command names to source file
1939
- * paths (relative to `cwd`). Warns for each source file that does not
1940
- * contain a shebang.
1941
- *
1942
- * When {@link ExportsOptions.devExports} is enabled, the `bin` field in
1943
- * `package.json` points to source files during local development, while
1944
- * `publishConfig.bin` points to built output paths for publishing.
1945
- *
1946
- * @example
1947
- * <caption>Auto-detect a CLI entry from a shebang</caption>
1948
- *
1949
- * ```ts
1950
- * {
1951
- * bin: true
1952
- * }
1953
- * ```
1954
- *
1955
- * @example
1956
- * <caption>Single CLI command with an explicit source entry</caption>
1957
- *
1958
- * ```ts
1959
- * {
1960
- * bin: './src/cli.ts'
1961
- * }
1962
- * ```
1963
- *
1964
- * @example
1965
- * <caption>Multiple named CLI commands</caption>
1966
- *
1967
- * ```ts
1968
- * {
1969
- * bin: {
1970
- * tool: './src/cli.ts',
1971
- * serve: './src/cli-extra.ts',
1972
- * },
1973
- * }
1974
- * ```
1975
- *
1976
- * @see {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | npm documentation for the `bin` field}
1977
- */
2116
+ * Generate the `bin` field in `package.json` for CLI executables.
2117
+ *
2118
+ * Behavior depends on the value:
2119
+ *
2120
+ * - *Unset* (default): Soft auto-detect. Scans entry chunks for shebangs
2121
+ * (e.g. `#!/usr/bin/env node`). If exactly one is found, it is used as
2122
+ * the bin entry. If multiple are found, a warning is shown and no `bin`
2123
+ * field is written. If none are found, nothing happens silently.
2124
+ * - `true`: Strict auto-detect. Same as the default, but throws if
2125
+ * multiple shebang entries are found, and warns if none are found.
2126
+ * Use this when your package is known to ship a CLI and you want to
2127
+ * fail fast on misconfiguration.
2128
+ * - `false`: Disable bin generation entirely, even if shebangs are
2129
+ * present.
2130
+ * - `string`: Use the given source file path (relative to `cwd`) as the
2131
+ * CLI entry. The command name is derived from the package name without
2132
+ * its scope. Warns if the source file does not contain a shebang.
2133
+ * - `Record<string, string>`: Explicitly map command names to source file
2134
+ * paths (relative to `cwd`). Warns for each source file that does not
2135
+ * contain a shebang.
2136
+ *
2137
+ * When {@link ExportsOptions.devExports} is enabled, the `bin` field in
2138
+ * `package.json` points to source files during local development, while
2139
+ * `publishConfig.bin` points to built output paths for publishing.
2140
+ *
2141
+ * @example
2142
+ * <caption>Auto-detect a CLI entry from a shebang</caption>
2143
+ *
2144
+ * ```ts
2145
+ * {
2146
+ * bin: true
2147
+ * }
2148
+ * ```
2149
+ *
2150
+ * @example
2151
+ * <caption>Single CLI command with an explicit source entry</caption>
2152
+ *
2153
+ * ```ts
2154
+ * {
2155
+ * bin: './src/cli.ts'
2156
+ * }
2157
+ * ```
2158
+ *
2159
+ * @example
2160
+ * <caption>Multiple named CLI commands</caption>
2161
+ *
2162
+ * ```ts
2163
+ * {
2164
+ * bin: {
2165
+ * tool: './src/cli.ts',
2166
+ * serve: './src/cli-extra.ts',
2167
+ * },
2168
+ * }
2169
+ * ```
2170
+ *
2171
+ * @see {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | npm documentation for the `bin` field}
2172
+ */
1978
2173
  bin?: boolean | string | Record<string, string>;
1979
- } //#endregion
2174
+ }
2175
+ //#endregion
1980
2176
  //#region src/features/pkg/publint.d.ts
1981
2177
  interface PublintOptions extends Omit<Options, "pack" | "pkgDir"> {
1982
2178
  module?: [typeof import("publint"), typeof import("publint/utils")];
1983
- } //#endregion
2179
+ }
2180
+ //#endregion
1984
2181
  //#region src/features/plugin.d.ts
1985
2182
  /**
1986
- * A tsdown-aware plugin. Extends Rolldown's {@linkcode Plugin} with
1987
- * tsdown-specific lifecycle hooks.
1988
- *
1989
- * Plugins that only use Rolldown's own lifecycle continue to work unchanged;
1990
- * tsdown detects these optional methods via runtime duck-typing.
1991
- */
2183
+ * A tsdown-aware plugin. Extends Rolldown's {@linkcode Plugin} with
2184
+ * tsdown-specific lifecycle hooks.
2185
+ *
2186
+ * Plugins that only use Rolldown's own lifecycle continue to work unchanged;
2187
+ * tsdown detects these optional methods via runtime duck-typing.
2188
+ */
1992
2189
  interface TsdownPlugin<A = any> extends Plugin<A> {
1993
2190
  /**
1994
- * Modify tsdown's user config before it is resolved. Analogous to Vite's
1995
- * [`config`](https://vite.dev/guide/api-plugin.html#config) hook.
1996
- *
1997
- * The hook may mutate {@linkcode config} in place, or return a partial
1998
- * {@linkcode UserConfig} that will be deep-merged into the current config.
1999
- * Array fields are replaced (not concatenated) during merging — to append
2000
- * plugins, mutate {@linkcode UserConfig.plugins | config.plugins} in place.
2001
- *
2002
- * The second argument is the original {@linkcode InlineConfig} passed to
2003
- * {@linkcode build | build()} (typically the CLI flags), useful for
2004
- * distinguishing values that came from the command line vs. the config file.
2005
- *
2006
- * Plugins injected via {@linkcode UserConfig.fromVite | fromVite} do not
2007
- * receive this hook, because they are loaded after the
2008
- * {@linkcode tsdownConfig} phase. Likewise, new plugins added by another
2009
- * plugin's {@linkcode tsdownConfig} do not themselves receive this hook
2010
- * (plugins are snapshotted before dispatch).
2011
- */
2191
+ * Modify tsdown's user config before it is resolved. Analogous to Vite's
2192
+ * [`config`](https://vite.dev/guide/api-plugin.html#config) hook.
2193
+ *
2194
+ * The hook may mutate {@linkcode config} in place, or return a partial
2195
+ * {@linkcode UserConfig} that will be deep-merged into the current config.
2196
+ * Array fields are replaced (not concatenated) during merging — to append
2197
+ * plugins, mutate {@linkcode UserConfig.plugins | config.plugins} in place.
2198
+ *
2199
+ * The second argument is the original {@linkcode InlineConfig} passed to
2200
+ * {@linkcode build | build()} (typically the CLI flags), useful for
2201
+ * distinguishing values that came from the command line vs. the config file.
2202
+ *
2203
+ * Plugins injected via {@linkcode UserConfig.fromVite | fromVite} do not
2204
+ * receive this hook, because they are loaded after the
2205
+ * {@linkcode tsdownConfig} phase. Likewise, new plugins added by another
2206
+ * plugin's {@linkcode tsdownConfig} do not themselves receive this hook
2207
+ * (plugins are snapshotted before dispatch).
2208
+ */
2012
2209
  tsdownConfig?: (config: UserConfig, inlineConfig: InlineConfig) => Awaitable<UserConfig | void | null>;
2013
2210
  /**
2014
- * Called after tsdown has fully resolved the user config. Analogous to
2015
- * Vite's [`configResolved`](https://vite.dev/guide/api-plugin.html#configresolved)
2016
- * hook.
2017
- *
2018
- * This hook fires once per produced {@linkcode ResolvedConfig} — i.e. once
2019
- * per output format when {@linkcode UserConfig.format | format} is an array.
2020
- * Typical usage is to stash the resolved config for later use in
2021
- * Rolldown hooks. Mutations made to {@linkcode resolvedConfig} here are
2022
- * not supported.
2023
- */
2211
+ * Called after tsdown has fully resolved the user config. Analogous to
2212
+ * Vite's [`configResolved`](https://vite.dev/guide/api-plugin.html#configresolved)
2213
+ * hook.
2214
+ *
2215
+ * This hook fires once per produced {@linkcode ResolvedConfig} — i.e. once
2216
+ * per output format when {@linkcode UserConfig.format | format} is an array.
2217
+ * Typical usage is to stash the resolved config for later use in
2218
+ * Rolldown hooks. Mutations made to {@linkcode resolvedConfig} here are
2219
+ * not supported.
2220
+ */
2024
2221
  tsdownConfigResolved?: (resolvedConfig: ResolvedConfig) => Awaitable<void>;
2025
2222
  }
2026
2223
  /**
2027
- * A tsdown plugin slot — accepts tsdown plugins, any Rolldown plugin form,
2028
- * `null`/`undefined`/`false`, {@linkcode Promise | promises}, and
2029
- * nested arrays. Mirrors Rolldown's {@linkcode RolldownPluginOption} but with
2030
- * {@linkcode TsdownPlugin} as the atom so that tsdown-specific hooks are
2031
- * type-checked.
2032
- */
2224
+ * A tsdown plugin slot — accepts tsdown plugins, any Rolldown plugin form,
2225
+ * `null`/`undefined`/`false`, {@linkcode Promise | promises}, and
2226
+ * nested arrays. Mirrors Rolldown's {@linkcode RolldownPluginOption} but with
2227
+ * {@linkcode TsdownPlugin} as the atom so that tsdown-specific hooks are
2228
+ * type-checked.
2229
+ */
2033
2230
  type TsdownPluginOption<A = any> = Awaitable<TsdownPlugin<A> | RolldownPlugin<A> | {
2034
2231
  name: string;
2035
- } | undefined | null | void | false | TsdownPluginOption<A>[]>; //#endregion
2232
+ } | undefined | null | void | false | TsdownPluginOption<A>[]>;
2233
+ //#endregion
2036
2234
  //#region src/features/report.d.ts
2037
2235
  interface ReportOptions {
2038
2236
  /**
2039
- * Enable/disable gzip-compressed size reporting.
2040
- * Compressing large output files can be slow, so disabling this may increase build performance for large projects.
2041
- *
2042
- * @default true
2043
- */
2237
+ * Enable/disable gzip-compressed size reporting.
2238
+ * Compressing large output files can be slow, so disabling this may increase build performance for large projects.
2239
+ *
2240
+ * @default true
2241
+ */
2044
2242
  gzip?: boolean;
2045
2243
  /**
2046
- * Enable/disable brotli-compressed size reporting.
2047
- * Compressing large output files can be slow, so disabling this may increase build performance for large projects.
2048
- *
2049
- * @default false
2050
- */
2244
+ * Enable/disable brotli-compressed size reporting.
2245
+ * Compressing large output files can be slow, so disabling this may increase build performance for large projects.
2246
+ *
2247
+ * @default false
2248
+ */
2051
2249
  brotli?: boolean;
2052
2250
  /**
2053
- * Skip reporting compressed size for files larger than this size.
2054
- * @default 1_000_000 // 1 MB
2055
- */
2251
+ * Skip reporting compressed size for files larger than this size.
2252
+ * @default 1_000_000 // 1 MB
2253
+ */
2056
2254
  maxCompressSize?: number;
2057
2255
  }
2058
2256
  //#endregion
2059
2257
  //#region src/config/types.d.ts
2060
2258
  interface DtsOptions extends Options$1 {
2061
2259
  /**
2062
- * When building dual ESM+CJS formats, generate a `.d.cts` re-export stub
2063
- * instead of running a full second TypeScript compilation pass.
2064
- *
2065
- * The stub re-exports everything from the corresponding `.d.mts` file,
2066
- * ensuring CJS and ESM consumers share the same type declarations. This
2067
- * eliminates the TypeScript "dual module hazard" where separate `.d.cts`
2068
- * and `.d.mts` declarations cause `TS2352` ("neither type sufficiently
2069
- * overlaps") errors when casting between types derived from the same class.
2070
- *
2071
- * Only applies when building both `esm` and `cjs` formats simultaneously.
2072
- *
2073
- * @remarks
2074
- * The generated `.d.cts` stub uses a relative path to re-export from the
2075
- * corresponding `.d.mts` file, so both formats must be emitted to the
2076
- * **same** `outDir`. Splitting CJS and ESM outputs into separate
2077
- * format-specific directories (e.g. `dist/cjs` and `dist/esm`) is not
2078
- * supported with this option, because the re-export path would be invalid.
2079
- *
2080
- * @default false
2081
- */
2260
+ * When building dual ESM+CJS formats, generate a `.d.cts` re-export stub
2261
+ * instead of running a full second TypeScript compilation pass.
2262
+ *
2263
+ * The stub re-exports everything from the corresponding `.d.mts` file,
2264
+ * ensuring CJS and ESM consumers share the same type declarations. This
2265
+ * eliminates the TypeScript "dual module hazard" where separate `.d.cts`
2266
+ * and `.d.mts` declarations cause `TS2352` ("neither type sufficiently
2267
+ * overlaps") errors when casting between types derived from the same class.
2268
+ *
2269
+ * Only applies when building both `esm` and `cjs` formats simultaneously.
2270
+ *
2271
+ * @remarks
2272
+ * The generated `.d.cts` stub uses a relative path to re-export from the
2273
+ * corresponding `.d.mts` file, so both formats must be emitted to the
2274
+ * **same** `outDir`. Splitting CJS and ESM outputs into separate
2275
+ * format-specific directories (e.g. `dist/cjs` and `dist/esm`) is not
2276
+ * supported with this option, because the re-export path would be invalid.
2277
+ *
2278
+ * @default false
2279
+ */
2082
2280
  cjsReexport?: boolean;
2083
2281
  }
2084
2282
  type Sourcemap = boolean | "inline" | "hidden";
2085
2283
  type Format = ModuleFormat;
2086
2284
  type NormalizedFormat = InternalModuleFormat;
2087
2285
  /**
2088
- * Extended input option that supports glob negation patterns.
2089
- *
2090
- * When using object form, values can be:
2091
- * - A single glob pattern string
2092
- * - An array of glob patterns, including negation patterns (prefixed with `!`)
2093
- *
2094
- * @example
2095
- * ```ts
2096
- * entry: {
2097
- * // Single pattern
2098
- * "utils/*": "./src/utils/*.ts",
2099
- * // Array with negation pattern to exclude files
2100
- * "hooks/*": ["./src/hooks/*.ts", "!./src/hooks/index.ts"],
2101
- * }
2102
- * ```
2103
- */
2286
+ * Extended input option that supports glob negation patterns.
2287
+ *
2288
+ * When using object form, values can be:
2289
+ * - A single glob pattern string
2290
+ * - An array of glob patterns, including negation patterns (prefixed with `!`)
2291
+ *
2292
+ * @example
2293
+ * ```ts
2294
+ * entry: {
2295
+ * // Single pattern
2296
+ * "utils/*": "./src/utils/*.ts",
2297
+ * // Array with negation pattern to exclude files
2298
+ * "hooks/*": ["./src/hooks/*.ts", "!./src/hooks/index.ts"],
2299
+ * }
2300
+ * ```
2301
+ */
2104
2302
  type TsdownInputOption = Arrayable<string | Record<string, Arrayable<string>>>;
2105
2303
  interface Workspace {
2106
2304
  /**
2107
- * Workspace directories. Glob patterns are supported.
2108
- * - `auto`: Automatically detect `package.json` files in the workspace.
2109
- * @default 'auto'
2110
- */
2305
+ * Workspace directories. Glob patterns are supported.
2306
+ * - `auto`: Automatically detect `package.json` files in the workspace.
2307
+ * @default 'auto'
2308
+ */
2111
2309
  include?: "auto" | (string & {}) | string[];
2112
2310
  /**
2113
- * Exclude directories from workspace.
2114
- * Defaults to all `node_modules`, `dist`, `test`, `tests`, `temp`, and `tmp` directories.
2115
- *
2116
- * @default ['**\/node_modules/**', '**\/dist/**', '**\/test?(s)/**', '**\/t?(e)mp/**']
2117
- */
2311
+ * Exclude directories from workspace.
2312
+ * Defaults to all `node_modules`, `dist`, `test`, `tests`, `temp`, and `tmp` directories.
2313
+ *
2314
+ * @default ['**\/node_modules/**', '**\/dist/**', '**\/test?(s)/**', '**\/t?(e)mp/**']
2315
+ */
2118
2316
  exclude?: Arrayable<string>;
2119
2317
  /**
2120
- * Path to the workspace configuration file.
2121
- */
2318
+ * Path to the workspace configuration file.
2319
+ */
2122
2320
  config?: boolean | string;
2123
2321
  }
2124
2322
  type CIOption = "ci-only" | "local-only";
2125
2323
  type WithEnabled<T> = boolean | undefined | CIOption | (T & {
2126
2324
  /**
2127
- * @default true
2128
- */
2325
+ * @default true
2326
+ */
2129
2327
  enabled?: boolean | CIOption;
2130
2328
  });
2131
2329
  /**
2132
- * Options for tsdown.
2133
- */
2330
+ * Options for tsdown.
2331
+ */
2134
2332
  interface UserConfig {
2135
2333
  /**
2136
- * Defaults to `'src/index.ts'` if it exists.
2137
- *
2138
- * Supports glob patterns with negation to exclude files:
2139
- * @example
2140
- * ```ts
2141
- * entry: {
2142
- * "hooks/*": ["./src/hooks/*.ts", "!./src/hooks/index.ts"],
2143
- * }
2144
- * ```
2145
- *
2146
- * @default { index: 'src/index.ts'}
2147
- */
2334
+ * Defaults to `'src/index.ts'` if it exists.
2335
+ *
2336
+ * Supports glob patterns with negation to exclude files:
2337
+ * @example
2338
+ * ```ts
2339
+ * entry: {
2340
+ * "hooks/*": ["./src/hooks/*.ts", "!./src/hooks/index.ts"],
2341
+ * }
2342
+ * ```
2343
+ *
2344
+ * @default { index: 'src/index.ts'}
2345
+ */
2148
2346
  entry?: TsdownInputOption;
2149
2347
  /**
2150
- * Dependency handling options.
2151
- */
2348
+ * Dependency handling options.
2349
+ */
2152
2350
  deps?: DepsConfig;
2153
- /**
2154
- * @deprecated Use {@linkcode DepsConfig.neverBundle | deps.neverBundle} instead.
2155
- */
2156
- external?: ExternalOption;
2157
- /**
2158
- * @deprecated Use {@linkcode DepsConfig.alwaysBundle | deps.alwaysBundle} instead.
2159
- */
2160
- noExternal?: Arrayable<string | RegExp> | NoExternalFn;
2161
- /**
2162
- * @deprecated Use {@linkcode DepsConfig.onlyBundle | deps.onlyBundle} instead.
2163
- */
2164
- inlineOnly?: Arrayable<string | RegExp> | false;
2165
- /**
2166
- * @deprecated Use {@linkcode DepsConfig.skipNodeModulesBundle | deps.skipNodeModulesBundle} instead.
2167
- * @default false
2168
- */
2169
- skipNodeModulesBundle?: boolean;
2170
2351
  alias?: Record<string, string>;
2171
2352
  /**
2172
- * @default true
2173
- */
2353
+ * @default true
2354
+ */
2174
2355
  tsconfig?: string | boolean;
2175
2356
  /**
2176
- * Specifies the target runtime platform for the build.
2177
- *
2178
- * - `node`: Node.js and compatible runtimes (e.g., Deno, Bun).
2179
- * For CJS format, this is always set to `node` and cannot be changed.
2180
- * - `neutral`: A platform-agnostic target with no specific runtime assumptions.
2181
- * - `browser`: Web browsers.
2182
- *
2183
- * @default 'node'
2184
- * @see https://tsdown.dev/options/platform
2185
- */
2357
+ * Specifies the target runtime platform for the build.
2358
+ *
2359
+ * - `node`: Node.js and compatible runtimes (e.g., Deno, Bun).
2360
+ * For CJS format, this is always set to `node` and cannot be changed.
2361
+ * - `neutral`: A platform-agnostic target with no specific runtime assumptions.
2362
+ * - `browser`: Web browsers.
2363
+ *
2364
+ * @default 'node'
2365
+ * @see https://tsdown.dev/options/platform
2366
+ */
2186
2367
  platform?: "node" | "neutral" | "browser";
2187
2368
  /**
2188
- * Specifies the compilation target environment(s).
2189
- *
2190
- * Determines the JavaScript version or runtime(s) for which the code should be compiled.
2191
- * If not set, defaults to the value of `engines.node` in your project's `package.json`.
2192
- * If no `engines.node` field exists, no syntax transformations are applied.
2193
- *
2194
- * Accepts a single target (e.g., `'es2020'`, `'node18'`, `'baseline-widely-available'`), an array of targets, or `false` to disable all transformations.
2195
- *
2196
- * @see {@link https://tsdown.dev/options/target#supported-targets} for a list of valid targets and more details.
2197
- *
2198
- * @example
2199
- * ```jsonc
2200
- * // Target a single environment
2201
- * { "target": "node18" }
2202
- * ```
2203
- *
2204
- * @example
2205
- * ```jsonc
2206
- * // Target multiple environments
2207
- * { "target": ["node18", "es2020"] }
2208
- * ```
2209
- *
2210
- * @example
2211
- * ```jsonc
2212
- * // Disable all syntax transformations
2213
- * { "target": false }
2214
- * ```
2215
- */
2369
+ * Specifies the compilation target environment(s).
2370
+ *
2371
+ * Determines the JavaScript version or runtime(s) for which the code should be compiled.
2372
+ * If not set, defaults to the value of `engines.node` in your project's `package.json`.
2373
+ * If no `engines.node` field exists, no syntax transformations are applied.
2374
+ *
2375
+ * Accepts a single target (e.g., `'es2020'`, `'node18'`, `'baseline-widely-available'`), an array of targets, or `false` to disable all transformations.
2376
+ *
2377
+ * @see {@link https://tsdown.dev/options/target#supported-targets} for a list of valid targets and more details.
2378
+ *
2379
+ * @example
2380
+ * ```jsonc
2381
+ * // Target a single environment
2382
+ * { "target": "node18" }
2383
+ * ```
2384
+ *
2385
+ * @example
2386
+ * ```jsonc
2387
+ * // Target multiple environments
2388
+ * { "target": ["node18", "es2020"] }
2389
+ * ```
2390
+ *
2391
+ * @example
2392
+ * ```jsonc
2393
+ * // Disable all syntax transformations
2394
+ * { "target": false }
2395
+ * ```
2396
+ */
2216
2397
  target?: string | string[] | false;
2217
2398
  /**
2218
- * Compile-time env variables, which can be accessed via `import.meta.env` or `process.env`.
2219
- * @example
2220
- * ```json
2221
- * {
2222
- * "DEBUG": true,
2223
- * "NODE_ENV": "production"
2224
- * }
2225
- * ```
2226
- *
2227
- * @default {}
2228
- */
2399
+ * Compile-time env variables, which can be accessed via `import.meta.env` or `process.env`.
2400
+ * @example
2401
+ * ```json
2402
+ * {
2403
+ * "DEBUG": true,
2404
+ * "NODE_ENV": "production"
2405
+ * }
2406
+ * ```
2407
+ *
2408
+ * @default {}
2409
+ */
2229
2410
  env?: Record<string, any>;
2230
2411
  /**
2231
- * Path to env file providing compile-time env variables.
2232
- * @example
2233
- * `.env`, `.env.production`, etc.
2234
- */
2412
+ * Path to env file providing compile-time env variables.
2413
+ * @example
2414
+ * `.env`, `.env.production`, etc.
2415
+ */
2235
2416
  envFile?: string;
2236
2417
  /**
2237
- * When loading env variables from `envFile`, only include variables with these prefixes.
2238
- * @default 'TSDOWN_'
2239
- */
2418
+ * When loading env variables from `envFile`, only include variables with these prefixes.
2419
+ * @default 'TSDOWN_'
2420
+ */
2240
2421
  envPrefix?: string | string[];
2241
2422
  define?: Record<string, string>;
2242
2423
  /**
2243
- * @default false
2244
- */
2424
+ * @default false
2425
+ */
2245
2426
  shims?: boolean;
2246
2427
  /**
2247
- * Configure tree shaking options.
2248
- * @see {@link https://rolldown.rs/options/treeshake} for more details.
2249
- * @default true
2250
- */
2428
+ * Configure tree shaking options.
2429
+ * @see {@link https://rolldown.rs/reference/InputOptions.treeshake} for more details.
2430
+ * @default true
2431
+ */
2251
2432
  treeshake?: boolean | TreeshakingOptions;
2252
2433
  /**
2253
- * Sets how input files are processed.
2254
- * For example, use 'js' to treat files as JavaScript or 'base64' for images.
2255
- * Lets you import or require files like images or fonts.
2256
- * @example
2257
- * ```json
2258
- * { ".jpg": "asset", ".png": "base64" }
2259
- * ```
2260
- */
2434
+ * Sets how input files are processed.
2435
+ * For example, use 'js' to treat files as JavaScript or 'base64' for images.
2436
+ * Lets you import or require files like images or fonts.
2437
+ * @example
2438
+ * ```json
2439
+ * { ".jpg": "asset", ".png": "base64" }
2440
+ * ```
2441
+ */
2261
2442
  loader?: ModuleTypes;
2262
2443
  /**
2263
- * Remove the `node:` prefix from built-in Node.js module imports.
2264
- * When enabled, rewrites import sources like `node:fs` to `fs`.
2265
- *
2266
- * @default false
2267
- * @deprecated Use {@linkcode nodeProtocol | nodeProtocol: 'strip'} instead.
2268
- *
2269
- * @example
2270
- * <caption>`removeNodeProtocol: true` — remove the `node:` prefix</caption>
2271
- *
2272
- * ```ts
2273
- * // Input
2274
- * import 'node:fs'
2275
- *
2276
- * // Output
2277
- * import 'fs'
2278
- * ```
2279
- */
2280
- removeNodeProtocol?: boolean;
2281
- /**
2282
- * Control whether built-in Node.js module imports use the `node:` protocol.
2283
- *
2284
- * - `true`: Add the `node:` prefix to built-in module imports.
2285
- * - `'strip'`: Remove the `node:` prefix from built-in module imports.
2286
- * - `false`: Do not transform built-in module imports.
2287
- *
2288
- * @default false
2289
- *
2290
- * @example
2291
- * <caption>`nodeProtocol: true` — add the `node:` prefix</caption>
2292
- *
2293
- * ```ts
2294
- * // Input
2295
- * import 'fs'
2296
- *
2297
- * // Output
2298
- * import 'node:fs'
2299
- * ```
2300
- *
2301
- * @example
2302
- * <caption>`nodeProtocol: 'strip'` — remove the `node:` prefix</caption>
2303
- *
2304
- * ```ts
2305
- * // Input
2306
- * import 'node:fs'
2307
- *
2308
- * // Output
2309
- * import 'fs'
2310
- * ```
2311
- *
2312
- * @example
2313
- * <caption>`nodeProtocol: false` — do not transform imports</caption>
2314
- *
2315
- * ```ts
2316
- * // Input
2317
- * import 'node:fs'
2318
- *
2319
- * // Output
2320
- * import 'node:fs'
2321
- * ```
2322
- */
2444
+ * Control whether built-in Node.js module imports use the `node:` protocol.
2445
+ *
2446
+ * - `true`: Add the `node:` prefix to built-in module imports.
2447
+ * - `'strip'`: Remove the `node:` prefix from built-in module imports.
2448
+ * - `false`: Do not transform built-in module imports.
2449
+ *
2450
+ * @default false
2451
+ *
2452
+ * @example
2453
+ * <caption>`nodeProtocol: true` — add the `node:` prefix</caption>
2454
+ *
2455
+ * ```ts
2456
+ * // Input
2457
+ * import 'fs'
2458
+ *
2459
+ * // Output
2460
+ * import 'node:fs'
2461
+ * ```
2462
+ *
2463
+ * @example
2464
+ * <caption>`nodeProtocol: 'strip'` — remove the `node:` prefix</caption>
2465
+ *
2466
+ * ```ts
2467
+ * // Input
2468
+ * import 'node:fs'
2469
+ *
2470
+ * // Output
2471
+ * import 'fs'
2472
+ * ```
2473
+ *
2474
+ * @example
2475
+ * <caption>`nodeProtocol: false` — do not transform imports</caption>
2476
+ *
2477
+ * ```ts
2478
+ * // Input
2479
+ * import 'node:fs'
2480
+ *
2481
+ * // Output
2482
+ * import 'node:fs'
2483
+ * ```
2484
+ */
2323
2485
  nodeProtocol?: "strip" | boolean;
2324
2486
  /**
2325
- * Controls which warnings are emitted during the build process. Each option can be set to `true` (emit warning) or `false` (suppress warning).
2326
- */
2487
+ * Controls which warnings are emitted during the build process. Each option can be set to `true` (emit warning) or `false` (suppress warning).
2488
+ */
2327
2489
  checks?: ChecksOptions & {
2328
2490
  /**
2329
- * If the config includes the `cjs` format and
2330
- * one of its target >= node 20.19.0 / 22.12.0,
2331
- * warn the user about the deprecation of CommonJS.
2332
- *
2333
- * @default true
2334
- */
2491
+ * If the config includes the `cjs` format and
2492
+ * one of its target >= node 20.19.0 / 22.12.0,
2493
+ * warn the user about the deprecation of CommonJS.
2494
+ *
2495
+ * @default true
2496
+ */
2335
2497
  legacyCjs?: boolean;
2336
2498
  };
2337
2499
  plugins?: TsdownPluginOption;
2338
2500
  /**
2339
- * Use with caution; ensure you understand the implications.
2340
- */
2501
+ * Use with caution; ensure you understand the implications.
2502
+ */
2341
2503
  inputOptions?: InputOptions | ((options: InputOptions, format: NormalizedFormat, context: {
2342
2504
  cjsDts: boolean;
2343
2505
  }) => Awaitable<InputOptions | void | null>);
2344
2506
  /**
2345
- * Output format(s). Available formats are
2346
- * - `esm`: ESM
2347
- * - `cjs`: CommonJS
2348
- * - `iife`: IIFE
2349
- * - `umd`: UMD
2350
- *
2351
- * @default 'esm'
2352
- */
2507
+ * Output format(s). Available formats are
2508
+ * - `esm`: ESM
2509
+ * - `cjs`: CommonJS
2510
+ * - `iife`: IIFE
2511
+ * - `umd`: UMD
2512
+ *
2513
+ * @default 'esm'
2514
+ */
2353
2515
  format?: Format | Format[] | Partial<Record<Format, Partial<ResolvedConfig>>>;
2354
2516
  globalName?: string;
2355
2517
  /**
2356
- * @default 'dist'
2357
- */
2518
+ * @default 'dist'
2519
+ */
2358
2520
  outDir?: string;
2359
2521
  /**
2360
- * Whether to write the files to disk.
2361
- * This option is incompatible with watch mode.
2362
- * @default true
2363
- */
2522
+ * Whether to write the files to disk.
2523
+ * This option is incompatible with watch mode.
2524
+ * @default true
2525
+ */
2364
2526
  write?: boolean;
2365
2527
  /**
2366
- * Whether to generate source map files.
2367
- *
2368
- * Note that this option will always be `true` if you have
2369
- * {@link https://www.typescriptlang.org/tsconfig/#declarationMap | `declarationMap`}
2370
- * option enabled in your `tsconfig.json`.
2371
- *
2372
- * @default false
2373
- */
2528
+ * Whether to generate source map files.
2529
+ *
2530
+ * Note that this option will always be `true` if you have
2531
+ * {@link https://www.typescriptlang.org/tsconfig/#declarationMap | `declarationMap`}
2532
+ * option enabled in your `tsconfig.json`.
2533
+ *
2534
+ * @default false
2535
+ */
2374
2536
  sourcemap?: Sourcemap;
2375
2537
  /**
2376
- * Clean directories before build.
2377
- *
2378
- * Default to output directory.
2379
- * @default true
2380
- */
2538
+ * Clean directories before build.
2539
+ *
2540
+ * Default to output directory.
2541
+ * @default true
2542
+ */
2381
2543
  clean?: boolean | string[];
2382
2544
  /**
2383
- * @default false
2384
- */
2545
+ * @default false
2546
+ */
2385
2547
  minify?: boolean | "dce-only" | MinifyOptions;
2386
2548
  footer?: ChunkAddon;
2387
2549
  banner?: ChunkAddon;
2388
2550
  /**
2389
- * Determines whether `unbundle` is enabled.
2390
- * When set to `true`, the output files will mirror the input file structure.
2391
- * @default false
2392
- */
2551
+ * Determines whether `unbundle` is enabled.
2552
+ * When set to `true`, the output files will mirror the input file structure.
2553
+ * @default false
2554
+ */
2393
2555
  unbundle?: boolean;
2394
2556
  /**
2395
- * Specifies the root directory of input files, similar to TypeScript's `rootDir`.
2396
- * This determines the output directory structure.
2397
- *
2398
- * By default, the root is computed as the common base directory of all entry files.
2399
- *
2400
- * @see https://www.typescriptlang.org/tsconfig/#rootDir
2401
- */
2557
+ * Specifies the root directory of input files, similar to TypeScript's `rootDir`.
2558
+ * This determines the output directory structure.
2559
+ *
2560
+ * By default, the root is computed as the common base directory of all entry files.
2561
+ *
2562
+ * @see https://www.typescriptlang.org/tsconfig/#rootDir
2563
+ */
2402
2564
  root?: string;
2403
2565
  /**
2404
- * @deprecated Use {@linkcode unbundle} instead.
2405
- * @default true
2406
- */
2407
- bundle?: boolean;
2408
- /**
2409
- * Use a fixed extension for output files.
2410
- * The extension will always be `.cjs` or `.mjs`.
2411
- * Otherwise, it will depend on the package type.
2412
- *
2413
- * Defaults to `true` if {@linkcode platform} is set to `node`,
2414
- * `false` otherwise.
2415
- *
2416
- * @default platform === 'node'
2417
- */
2566
+ * Use a fixed extension for output files.
2567
+ * The extension will always be `.cjs` or `.mjs`.
2568
+ * Otherwise, it will depend on the package type.
2569
+ *
2570
+ * Defaults to `true` if {@linkcode platform} is set to `node`,
2571
+ * `false` otherwise.
2572
+ *
2573
+ * @default platform === 'node'
2574
+ */
2418
2575
  fixedExtension?: boolean;
2419
2576
  /**
2420
- * Custom extensions for output files.
2421
- * {@linkcode fixedExtension} will be overridden by this option.
2422
- */
2577
+ * Custom extensions for output files.
2578
+ * {@linkcode fixedExtension} will be overridden by this option.
2579
+ */
2423
2580
  outExtensions?: OutExtensionFactory;
2424
2581
  /**
2425
- * @deprecated Use {@linkcode outExtensions} instead.
2426
- */
2427
- outExtension?: OutExtensionFactory;
2428
- /**
2429
- * If enabled, appends hash to chunk filenames.
2430
- * @default true
2431
- */
2582
+ * If enabled, appends hash to chunk filenames.
2583
+ * @default true
2584
+ */
2432
2585
  hash?: boolean;
2433
2586
  /**
2434
- * @default true
2435
- */
2587
+ * @default true
2588
+ */
2436
2589
  cjsDefault?: boolean;
2437
2590
  /**
2438
- * Use with caution; ensure you understand the implications.
2439
- */
2591
+ * Use with caution; ensure you understand the implications.
2592
+ */
2440
2593
  outputOptions?: OutputOptions | ((options: OutputOptions, format: NormalizedFormat, context: {
2441
2594
  cjsDts: boolean;
2442
2595
  }) => Awaitable<OutputOptions | void | null>);
2443
2596
  /**
2444
- * The working directory of the config file.
2445
- * - Defaults to {@linkcode process.cwd | process.cwd()} for root config.
2446
- * - Defaults to the package directory for {@linkcode workspace} config.
2447
- *
2448
- * @default process.cwd()
2449
- */
2597
+ * The working directory of the config file.
2598
+ * - Defaults to {@linkcode process.cwd | process.cwd()} for root config.
2599
+ * - Defaults to the package directory for {@linkcode workspace} config.
2600
+ *
2601
+ * @default process.cwd()
2602
+ */
2450
2603
  cwd?: string;
2451
2604
  /**
2452
- * The name to show in CLI output. This is useful for monorepos or workspaces.
2453
- * When using workspace mode, this option defaults to the package name from package.json.
2454
- * In non-workspace mode, this option must be set explicitly for the name to show in the CLI output.
2455
- */
2605
+ * The name to show in CLI output. This is useful for monorepos or workspaces.
2606
+ * When using workspace mode, this option defaults to the package name from package.json.
2607
+ * In non-workspace mode, this option must be set explicitly for the name to show in the CLI output.
2608
+ */
2456
2609
  name?: string;
2457
2610
  /**
2458
- * Log level.
2459
- * @default 'info'
2460
- */
2611
+ * Log level.
2612
+ * @default 'info'
2613
+ */
2461
2614
  logLevel?: LogLevel;
2462
2615
  /**
2463
- * If true, fails the build on warnings.
2464
- * @default false
2465
- */
2616
+ * If true, fails the build on warnings.
2617
+ * @default false
2618
+ */
2466
2619
  failOnWarn?: boolean | CIOption;
2467
2620
  /**
2468
- * Custom logger.
2469
- */
2621
+ * Suppress warnings whose message matches the given pattern(s).
2622
+ *
2623
+ * Accepts a string (substring match), a `RegExp`, an array of either, or a
2624
+ * predicate function. Matched warnings are dropped before `failOnWarn` is
2625
+ * applied, so they won't fail the build.
2626
+ */
2627
+ suppressWarnings?: Arrayable<RegExp | string> | ((msg: string) => boolean);
2628
+ /**
2629
+ * Custom logger.
2630
+ */
2470
2631
  customLogger?: Logger;
2471
2632
  /**
2472
- * Reuse config from Vite or Vitest (experimental)
2473
- * @default false
2474
- */
2633
+ * Reuse config from Vite or Vitest (experimental)
2634
+ * @default false
2635
+ */
2475
2636
  fromVite?: boolean | "vitest";
2476
2637
  /**
2477
- * @default false
2478
- */
2638
+ * @default false
2639
+ */
2479
2640
  watch?: boolean | Arrayable<string>;
2480
2641
  /**
2481
- * Files or patterns to not watch while in watch mode.
2482
- */
2642
+ * Files or patterns to not watch while in watch mode.
2643
+ */
2483
2644
  ignoreWatch?: Arrayable<string | RegExp>;
2484
2645
  /**
2485
- * **[experimental]** Enable devtools.
2486
- *
2487
- * DevTools is still under development, and this is for early testers only.
2488
- *
2489
- * This may slow down the build process significantly.
2490
- *
2491
- * @default false
2492
- */
2646
+ * **[experimental]** Enable devtools.
2647
+ *
2648
+ * DevTools is still under development, and this is for early testers only.
2649
+ *
2650
+ * This may slow down the build process significantly.
2651
+ *
2652
+ * @default false
2653
+ */
2493
2654
  devtools?: WithEnabled<DevtoolsOptions>;
2494
2655
  /**
2495
- * You can specify command to be executed after a successful build, specially useful for Watch mode
2496
- */
2656
+ * You can specify command to be executed after a successful build, specially useful for Watch mode
2657
+ */
2497
2658
  onSuccess?: string | ((config: ResolvedConfig, signal: AbortSignal) => void | Promise<void>);
2498
2659
  /**
2499
- * Enables generation of TypeScript declaration files (`.d.ts`).
2500
- *
2501
- * By default, this option is auto-detected based on your project's `package.json`:
2502
- * - If {@linkcode exe} is enabled, declaration file generation is disabled by default.
2503
- * - If the `types` field is present, or if the main `exports` contains a `types` entry, declaration file generation is enabled by default.
2504
- * - Otherwise, declaration file generation is disabled by default.
2505
- */
2660
+ * Enables generation of TypeScript declaration files (`.d.ts`).
2661
+ *
2662
+ * By default, this option is auto-detected based on your project's `package.json`:
2663
+ * - If {@linkcode exe} is enabled, declaration file generation is disabled by default.
2664
+ * - If the `types` field is present, or if the main `exports` contains a `types` entry, declaration file generation is enabled by default.
2665
+ * - Otherwise, declaration file generation is disabled by default.
2666
+ */
2506
2667
  dts?: WithEnabled<DtsOptions>;
2507
2668
  /**
2508
- * Enable unused dependencies check with `unplugin-unused`
2509
- * Requires `unplugin-unused` to be installed.
2510
- * @default false
2511
- */
2669
+ * Enable unused dependencies check with `unplugin-unused`
2670
+ * Requires `unplugin-unused` to be installed.
2671
+ * @default false
2672
+ */
2512
2673
  unused?: WithEnabled<UnusedOptions>;
2513
2674
  /**
2514
- * Run `publint` after bundling.
2515
- * Requires `publint` to be installed.
2516
- * @default false
2517
- */
2675
+ * Run `publint` after bundling.
2676
+ * Requires `publint` to be installed.
2677
+ * @default false
2678
+ */
2518
2679
  publint?: WithEnabled<PublintOptions>;
2519
2680
  /**
2520
- * Run `arethetypeswrong` after bundling.
2521
- * Requires `@arethetypeswrong/core` to be installed.
2522
- *
2523
- * @default false
2524
- * @see https://github.com/arethetypeswrong/arethetypeswrong.github.io
2525
- */
2681
+ * Run `arethetypeswrong` after bundling.
2682
+ * Requires `@arethetypeswrong/core` to be installed.
2683
+ *
2684
+ * @default false
2685
+ * @see https://github.com/arethetypeswrong/arethetypeswrong.github.io
2686
+ */
2526
2687
  attw?: WithEnabled<AttwOptions>;
2527
2688
  /**
2528
- * Enable size reporting after bundling.
2529
- * @default true
2530
- */
2689
+ * Enable size reporting after bundling.
2690
+ * @default true
2691
+ */
2531
2692
  report?: WithEnabled<ReportOptions>;
2532
2693
  /**
2533
- * `import.meta.glob` support.
2534
- * @see https://vite.dev/guide/features.html#glob-import
2535
- * @default true
2536
- */
2694
+ * `import.meta.glob` support.
2695
+ * @see https://vite.dev/guide/features.html#glob-import
2696
+ * @default true
2697
+ */
2537
2698
  globImport?: boolean;
2538
2699
  /**
2539
- * Generate package exports for `package.json`.
2540
- *
2541
- * This will set the `exports` field in `package.json` to point to the
2542
- * generated files.
2543
- *
2544
- * @default false
2545
- */
2700
+ * Generate package exports for `package.json`.
2701
+ *
2702
+ * This will set the `exports` field in `package.json` to point to the
2703
+ * generated files.
2704
+ *
2705
+ * @default false
2706
+ */
2546
2707
  exports?: WithEnabled<ExportsOptions>;
2547
2708
  /**
2548
- * **[experimental]** CSS options.
2549
- * Requires `@tsdown/css` to be installed.
2550
- */
2709
+ * **[experimental]** CSS options.
2710
+ * Requires `@tsdown/css` to be installed.
2711
+ */
2551
2712
  css?: CssOptions;
2552
2713
  /**
2553
- * @deprecated Use {@linkcode CssOptions.inject | css.inject} instead.
2554
- */
2555
- injectStyle?: boolean;
2556
- /**
2557
- * @alias copy
2558
- * @deprecated Alias for {@linkcode copy}, will be removed in the future.
2559
- */
2560
- publicDir?: CopyOptions | CopyOptionsFn;
2561
- /**
2562
- * Copy files to another directory.
2563
- * @example
2564
- * ```ts
2565
- * [
2566
- * 'src/assets',
2567
- * 'src/env.d.ts',
2568
- * 'src/styles/**\/*.css',
2569
- * { from: 'src/assets', to: 'dist/assets' },
2570
- * { from: 'src/styles/**\/*.css', to: 'dist', flatten: true },
2571
- * ]
2572
- * ```
2573
- */
2714
+ * Copy files to another directory.
2715
+ * @example
2716
+ * ```ts
2717
+ * [
2718
+ * 'src/assets',
2719
+ * 'src/env.d.ts',
2720
+ * 'src/styles/**\/*.css',
2721
+ * { from: 'src/assets', to: 'dist/assets' },
2722
+ * { from: 'src/styles/**\/*.css', to: 'dist', flatten: true },
2723
+ * ]
2724
+ * ```
2725
+ */
2574
2726
  copy?: CopyOptions | CopyOptionsFn;
2575
2727
  hooks?: Partial<TsdownHooks> | ((hooks: Hookable<TsdownHooks>) => Awaitable<void>);
2576
2728
  /**
2577
- * **[experimental]** Bundle as executable using Node.js SEA (Single Executable Applications).
2578
- *
2579
- * This will bundle the output into a single executable file using Node.js SEA.
2580
- * Note that this is only supported on Node.js 25.7.0 and later, and is not supported in Bun or Deno.
2581
- *
2582
- * @default false
2583
- */
2729
+ * **[experimental]** Bundle as executable using Node.js SEA (Single Executable Applications).
2730
+ *
2731
+ * This will bundle the output into a single executable file using Node.js SEA.
2732
+ * Note that this is only supported on Node.js 25.7.0 and later, and is not supported in Bun or Deno.
2733
+ *
2734
+ * @default false
2735
+ */
2584
2736
  exe?: WithEnabled<ExeOptions>;
2585
2737
  /**
2586
- * **[experimental]** Enable workspace mode.
2587
- * This allows you to build multiple packages in a monorepo.
2588
- */
2738
+ * **[experimental]** Enable workspace mode.
2739
+ * This allows you to build multiple packages in a monorepo.
2740
+ */
2589
2741
  workspace?: Workspace | Arrayable<string> | true;
2742
+ /**
2743
+ * @deprecated Use {@linkcode DepsConfig.neverBundle | deps.neverBundle} instead.
2744
+ */
2745
+ external?: ExternalOption;
2746
+ /**
2747
+ * @deprecated Use {@linkcode DepsConfig.alwaysBundle | deps.alwaysBundle} instead.
2748
+ */
2749
+ noExternal?: Arrayable<string | RegExp> | NoExternalFn;
2750
+ /**
2751
+ * @deprecated Use {@linkcode DepsConfig.onlyBundle | deps.onlyBundle} instead.
2752
+ */
2753
+ inlineOnly?: Arrayable<string | RegExp> | false;
2754
+ /**
2755
+ * @deprecated Use {@linkcode DepsConfig.neverBundle | deps.neverBundle: true} instead.
2756
+ * @default false
2757
+ */
2758
+ skipNodeModulesBundle?: boolean;
2759
+ /**
2760
+ * Remove the `node:` prefix from built-in Node.js module imports.
2761
+ * When enabled, rewrites import sources like `node:fs` to `fs`.
2762
+ *
2763
+ * @default false
2764
+ * @deprecated Use {@linkcode nodeProtocol | nodeProtocol: 'strip'} instead.
2765
+ *
2766
+ * @example
2767
+ * <caption>`removeNodeProtocol: true` — remove the `node:` prefix</caption>
2768
+ *
2769
+ * ```ts
2770
+ * // Input
2771
+ * import 'node:fs'
2772
+ *
2773
+ * // Output
2774
+ * import 'fs'
2775
+ * ```
2776
+ */
2777
+ removeNodeProtocol?: boolean;
2778
+ /**
2779
+ * @deprecated Use {@linkcode unbundle} instead.
2780
+ * @default true
2781
+ */
2782
+ bundle?: boolean;
2783
+ /**
2784
+ * @deprecated Use {@linkcode outExtensions} instead.
2785
+ */
2786
+ outExtension?: OutExtensionFactory;
2787
+ /**
2788
+ * @deprecated Use {@linkcode CssOptions.inject | css.inject} instead.
2789
+ */
2790
+ injectStyle?: boolean;
2791
+ /**
2792
+ * @alias copy
2793
+ * @deprecated Alias for {@linkcode copy}, will be removed in the future.
2794
+ */
2795
+ publicDir?: CopyOptions | CopyOptionsFn;
2590
2796
  }
2591
2797
  interface InlineConfig extends UserConfig {
2592
2798
  /**
2593
- * Config file path
2594
- */
2799
+ * Config file path
2800
+ */
2595
2801
  config?: boolean | string;
2596
2802
  /**
2597
- * Config loader to use. It can only be set via CLI or API.
2598
- * @default 'auto'
2599
- */
2803
+ * Config loader to use. It can only be set via CLI or API.
2804
+ * @default 'auto'
2805
+ */
2600
2806
  configLoader?: "auto" | "native" | "tsx" | "unrun";
2601
2807
  /**
2602
- * Filter configs by cwd or name.
2603
- */
2808
+ * Filter configs by cwd or name.
2809
+ */
2604
2810
  filter?: RegExp | Arrayable<string>;
2605
2811
  }
2606
2812
  type UserConfigFn = (inlineConfig: InlineConfig, context: {
@@ -2608,14 +2814,14 @@ type UserConfigFn = (inlineConfig: InlineConfig, context: {
2608
2814
  rootConfig?: UserConfig;
2609
2815
  }) => Awaitable<Arrayable<UserConfig>>;
2610
2816
  type UserConfigExport = Awaitable<Arrayable<UserConfig> | UserConfigFn>;
2611
- type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "fromVite" | "publicDir" | "bundle" | "injectStyle" | "removeNodeProtocol" | "outExtension" | "external" | "noExternal" | "inlineOnly" | "skipNodeModulesBundle" | "logLevel" | "failOnWarn" | "customLogger" | "envFile" | "envPrefix">, "globalName" | "inputOptions" | "outputOptions" | "minify" | "define" | "alias" | "onSuccess" | "outExtensions" | "hooks" | "copy" | "loader" | "name" | "banner" | "footer" | "checks" | "css">, {
2817
+ type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "fromVite" | "publicDir" | "bundle" | "injectStyle" | "removeNodeProtocol" | "outExtension" | "external" | "noExternal" | "inlineOnly" | "skipNodeModulesBundle" | "logLevel" | "failOnWarn" | "suppressWarnings" | "customLogger" | "envFile" | "envPrefix">, "globalName" | "inputOptions" | "outputOptions" | "minify" | "define" | "alias" | "onSuccess" | "outExtensions" | "hooks" | "copy" | "loader" | "name" | "banner" | "footer" | "checks" | "css">, {
2612
2818
  /**
2613
- * Resolved entry map (after glob expansion)
2614
- */
2819
+ * Resolved entry map (after glob expansion)
2820
+ */
2615
2821
  entry: Record<string, string>;
2616
2822
  /**
2617
- * Original entry config before glob resolution (for watch mode re-globbing)
2618
- */
2823
+ * Original entry config before glob resolution (for watch mode re-globbing)
2824
+ */
2619
2825
  rawEntry?: TsdownInputOption;
2620
2826
  nameLabel: string | undefined;
2621
2827
  format: NormalizedFormat;
@@ -2627,8 +2833,8 @@ type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "from
2627
2833
  ignoreWatch: Array<string | RegExp>;
2628
2834
  deps: ResolvedDepsConfig;
2629
2835
  /**
2630
- * Resolved root directory of input files
2631
- */
2836
+ * Resolved root directory of input files
2837
+ */
2632
2838
  root: string;
2633
2839
  configDeps: Set<string>;
2634
2840
  dts: false | DtsOptions;
@@ -2640,42 +2846,47 @@ type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "from
2640
2846
  attw: false | AttwOptions;
2641
2847
  unused: false | UnusedOptions;
2642
2848
  exe: false | ExeOptions;
2643
- }>; //#endregion
2849
+ }>;
2644
2850
  //#endregion
2645
- //#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_b3805a6765df28d505319221a7193e18/node_modules/tsdown/dist/config-BJZDmsYq.d.mts
2851
+ //#region ../../node_modules/.pnpm/tsdown@0.22.13_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.13_@tsdown+exe@0.22.13_@t_f26a610f558bef85f3db2230cc877c56/node_modules/tsdown/dist/config-3sAcYqvi.d.mts
2646
2852
  //#region src/config/options.d.ts
2647
2853
  /**
2648
- * Resolve user config into resolved configs
2649
- *
2650
- * **Internal API, not for public use**
2651
- * @private
2652
- */
2854
+ * Resolve user config into resolved configs
2855
+ *
2856
+ * **Internal API, not for public use**
2857
+ * @private
2858
+ */
2653
2859
  declare function resolveUserConfig(userConfig: UserConfig, inlineConfig: InlineConfig, configDeps: Set<string>): Promise<ResolvedConfig[]>;
2654
2860
  declare function mergeConfig(defaults: UserConfig, ...overrides: UserConfig[]): UserConfig;
2655
- declare function mergeConfig(defaults: InlineConfig, ...overrides: InlineConfig[]): InlineConfig; //#endregion
2861
+ declare function mergeConfig(defaults: InlineConfig, ...overrides: InlineConfig[]): InlineConfig;
2862
+ //#endregion
2656
2863
  //#region src/config.d.ts
2657
2864
  /**
2658
- * Defines the configuration for tsdown.
2659
- */
2865
+ * Defines the configuration for tsdown.
2866
+ */
2660
2867
  declare function defineConfig(options: UserConfig): UserConfig;
2661
2868
  declare function defineConfig(options: UserConfig[]): UserConfig[];
2662
2869
  declare function defineConfig(options: UserConfigFn): UserConfigFn;
2663
- declare function defineConfig(options: UserConfigExport): UserConfigExport; //#endregion
2870
+ declare function defineConfig(options: UserConfigExport): UserConfigExport;
2664
2871
  //#endregion
2665
- //#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_b3805a6765df28d505319221a7193e18/node_modules/tsdown/dist/index.d.mts
2872
+ //#region ../../node_modules/.pnpm/tsdown@0.22.13_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.13_@tsdown+exe@0.22.13_@t_f26a610f558bef85f3db2230cc877c56/node_modules/tsdown/dist/index.d.mts
2666
2873
  //#region src/build.d.ts
2667
2874
  /**
2668
- * Build with tsdown.
2669
- */
2875
+ * Build with tsdown.
2876
+ */
2670
2877
  declare function build$1(inlineConfig?: InlineConfig): Promise<TsdownBundle[]>;
2671
2878
  /**
2672
- * Build with `ResolvedConfigs`.
2673
- *
2674
- * **Internal API, not for public use**
2675
- * @private
2676
- */
2677
- declare function buildWithConfigs(configs: ResolvedConfig[], configDeps: Set<string>, _restart: () => void): Promise<TsdownBundle[]>; //#endregion
2879
+ * Build with `ResolvedConfigs`.
2880
+ *
2881
+ * **Internal API, not for public use**
2882
+ * @private
2883
+ */
2884
+ declare function buildWithConfigs(configs: ResolvedConfig[], configDeps: Set<string>, _restart: () => void): Promise<TsdownBundle[]>;
2885
+ //#endregion
2678
2886
  //#region src/features/debug.d.ts
2679
- declare function enableDebug(debug?: boolean | Arrayable<string>): void; //#endregion
2887
+ declare function enableDebug(debug?: boolean | Arrayable<string>): void;
2888
+ //#endregion
2889
+ //#region src/index.d.ts
2890
+ declare const version: string;
2680
2891
  //#endregion
2681
- export { type AttwOptions, type BuildContext, CIOption, type ChunkAddon, type ChunkAddonFunction, type ChunkAddonObject, type CopyEntry, type CopyOptions, type CopyOptionsFn, type DepsConfig, type DevtoolsOptions, DtsOptions, type ExeOptions, type ExportsOptions, Format, InlineConfig, type Logger, type NoExternalFn, NormalizedFormat, type OutExtensionContext, type OutExtensionFactory, type OutExtensionObject, type PackageJsonWithPath, type PackageType, type PublintOptions, type ReportOptions, ResolvedConfig, type ResolvedDepsConfig, Rolldown, type RolldownChunk, type RolldownContext, type SeaConfig, Sourcemap, type TreeshakingOptions, type TsdownBundle, type TsdownHooks, TsdownInputOption, type TsdownPlugin, type TsdownPluginOption, type UnusedOptions, UserConfig, UserConfigExport, UserConfigFn, WithEnabled, Workspace, build$1 as build, buildWithConfigs, defineConfig, enableDebug, globalLogger, mergeConfig, resolveUserConfig };
2892
+ export { type AttwOptions, type BuildContext, CIOption, type ChunkAddon, type ChunkAddonFunction, type ChunkAddonObject, type CopyEntry, type CopyOptions, type CopyOptionsFn, type DepsConfig, type DevtoolsOptions, DtsOptions, type ExeOptions, type ExportsOptions, Format, InlineConfig, type Logger, type NoExternalFn, NormalizedFormat, type OutExtensionContext, type OutExtensionFactory, type OutExtensionObject, type PackageJsonWithPath, type PackageType, type PublintOptions, type ReportOptions, ResolvedConfig, type ResolvedDepsConfig, Rolldown, type RolldownChunk, type RolldownContext, type SeaConfig, Sourcemap, type TreeshakingOptions, type TsdownBundle, type TsdownHooks, TsdownInputOption, type TsdownPlugin, type TsdownPluginOption, type UnusedOptions, UserConfig, UserConfigExport, UserConfigFn, WithEnabled, Workspace, build$1 as build, buildWithConfigs, defineConfig, enableDebug, globalLogger, mergeConfig, resolveUserConfig, version };