@visulima/packem 1.28.2 → 2.0.0-alpha.2

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 (594) hide show
  1. package/CHANGELOG.md +134 -0
  2. package/LICENSE.md +3033 -256
  3. package/dist/builder/typedoc/index.d.mts +27 -3
  4. package/dist/builder/typedoc/index.d.ts +26 -2
  5. package/dist/builder/typedoc/index.mjs +1 -1
  6. package/dist/cli/index.mjs +37 -194
  7. package/dist/config/index.d.mts +29 -47
  8. package/dist/config/index.d.ts +29 -47
  9. package/dist/config/index.mjs +1 -1
  10. package/dist/index.d.mts +31 -43
  11. package/dist/index.d.ts +31 -43
  12. package/dist/index.mjs +1 -156
  13. package/dist/packem_shared/browserslistToEsbuild-C0IWmbNe-C6xPL1oW.mjs +1 -0
  14. package/dist/packem_shared/create-or-update-key-storage-GwAIWW7R.mjs +3 -0
  15. package/dist/packem_shared/default-CBa9Nwy_.mjs +1 -0
  16. package/dist/packem_shared/default-DlLVgYRF.mjs +1 -0
  17. package/dist/packem_shared/default-DrXMWF-8.mjs +1 -0
  18. package/dist/packem_shared/default-DuCyCmG2.mjs +1 -0
  19. package/dist/packem_shared/default-lC8LWTO_.mjs +1 -0
  20. package/dist/packem_shared/esbuildPlugin-BAwyhG6L-BTISgbUT.mjs +3 -0
  21. package/dist/packem_shared/index-CG57YXz-.mjs +138 -0
  22. package/dist/packem_shared/index-CUp9WuCG.mjs +1 -0
  23. package/dist/packem_shared/index-Sedl0fV9.d.mts +2554 -0
  24. package/dist/packem_shared/index-Sedl0fV9.d.ts +2554 -0
  25. package/dist/packem_shared/isolatedDeclarationsOxcTransformer-WbfE6cGu-NeZOx2Y7.mjs +1 -0
  26. package/dist/packem_shared/isolatedDeclarationsSwcTransformer-Ch2AgtWC-B-0lOgFf.mjs +1 -0
  27. package/dist/packem_shared/isolatedDeclarationsTypescriptTransformer-DkuEkofo-Cwe3ODMG.mjs +3 -0
  28. package/dist/packem_shared/oxcResolvePlugin-BJpi-eSG-BsYx9cDO.mjs +1 -0
  29. package/dist/packem_shared/oxcTransformPlugin-DfVQouIB-Bxgxc0jX.mjs +4 -0
  30. package/dist/packem_shared/resolveTypescriptMjsCtsPlugin-DcZrZTmM-BEkYWTsH.mjs +6 -0
  31. package/dist/packem_shared/swcPlugin-Boip4lWG-DWNziB_j.mjs +1 -0
  32. package/dist/packem_shared/types-Bgf1bUQM.d.mts +2765 -0
  33. package/dist/packem_shared/types-C-wHDExv.d.ts +2765 -0
  34. package/dist/rollup/plugins/css/loaders/less.d.mts +1 -0
  35. package/dist/rollup/plugins/css/loaders/less.d.ts +2 -0
  36. package/dist/rollup/plugins/css/loaders/less.mjs +1 -0
  37. package/dist/rollup/plugins/css/loaders/lightningcss.d.mts +1 -4
  38. package/dist/rollup/plugins/css/loaders/lightningcss.d.ts +2 -4
  39. package/dist/rollup/plugins/css/loaders/lightningcss.mjs +1 -3
  40. package/dist/rollup/plugins/css/loaders/postcss.d.mts +1 -0
  41. package/dist/rollup/plugins/css/loaders/postcss.d.ts +2 -0
  42. package/dist/rollup/plugins/css/loaders/postcss.mjs +1 -0
  43. package/dist/rollup/plugins/css/loaders/sass.d.mts +1 -0
  44. package/dist/rollup/plugins/css/loaders/sass.d.ts +2 -0
  45. package/dist/rollup/plugins/css/loaders/sass.mjs +1 -0
  46. package/dist/rollup/plugins/css/loaders/sourcemap.d.mts +8 -3
  47. package/dist/rollup/plugins/css/loaders/sourcemap.d.ts +9 -3
  48. package/dist/rollup/plugins/css/loaders/sourcemap.mjs +1 -1
  49. package/dist/rollup/plugins/css/loaders/stylus.d.mts +1 -0
  50. package/dist/rollup/plugins/css/loaders/stylus.d.ts +2 -0
  51. package/dist/rollup/plugins/css/loaders/stylus.mjs +1 -0
  52. package/dist/rollup/plugins/css/minifiers/cssnano.d.mts +1 -4
  53. package/dist/rollup/plugins/css/minifiers/cssnano.d.ts +2 -4
  54. package/dist/rollup/plugins/css/minifiers/cssnano.mjs +1 -1
  55. package/dist/rollup/plugins/css/minifiers/lightningcss.d.mts +1 -4
  56. package/dist/rollup/plugins/css/minifiers/lightningcss.d.ts +2 -4
  57. package/dist/rollup/plugins/css/minifiers/lightningcss.mjs +1 -3
  58. package/dist/rollup/plugins/esbuild/index.d.mts +22 -3
  59. package/dist/rollup/plugins/esbuild/index.d.ts +21 -2
  60. package/dist/rollup/plugins/esbuild/index.mjs +1 -3
  61. package/dist/rollup/plugins/oxc/isolated-declarations-oxc-transformer.d.mts +22 -3
  62. package/dist/rollup/plugins/oxc/isolated-declarations-oxc-transformer.d.ts +9 -3
  63. package/dist/rollup/plugins/oxc/isolated-declarations-oxc-transformer.mjs +1 -1
  64. package/dist/rollup/plugins/oxc/oxc-transformer.d.mts +18 -3
  65. package/dist/rollup/plugins/oxc/oxc-transformer.d.ts +19 -3
  66. package/dist/rollup/plugins/oxc/oxc-transformer.mjs +1 -4
  67. package/dist/rollup/plugins/sucrase/index.d.mts +17 -3
  68. package/dist/rollup/plugins/sucrase/index.d.ts +18 -3
  69. package/dist/rollup/plugins/sucrase/index.mjs +1 -1
  70. package/dist/rollup/plugins/swc/isolated-declarations-swc-transformer.d.mts +18 -3
  71. package/dist/rollup/plugins/swc/isolated-declarations-swc-transformer.d.ts +19 -3
  72. package/dist/rollup/plugins/swc/isolated-declarations-swc-transformer.mjs +1 -1
  73. package/dist/rollup/plugins/swc/swc-plugin.d.mts +24 -3
  74. package/dist/rollup/plugins/swc/swc-plugin.d.ts +9 -2
  75. package/dist/rollup/plugins/swc/swc-plugin.mjs +1 -1
  76. package/dist/rollup/plugins/typescript/isolated-declarations-typescript-transformer.d.mts +21 -3
  77. package/dist/rollup/plugins/typescript/isolated-declarations-typescript-transformer.d.ts +20 -2
  78. package/dist/rollup/plugins/typescript/isolated-declarations-typescript-transformer.mjs +1 -3
  79. package/package.json +61 -271
  80. package/dist/builder/typedoc/generate-reference-documentation.d.cts +0 -4
  81. package/dist/builder/typedoc/generate-reference-documentation.d.mts +0 -4
  82. package/dist/builder/typedoc/generate-reference-documentation.d.ts +0 -4
  83. package/dist/builder/typedoc/index.cjs +0 -3
  84. package/dist/builder/typedoc/index.d.cts +0 -3
  85. package/dist/cli/commands/add.d.mts +0 -3
  86. package/dist/cli/commands/build.d.mts +0 -21
  87. package/dist/cli/commands/init.d.mts +0 -3
  88. package/dist/cli/commands/utils/css-loader-dependencies.d.mts +0 -2
  89. package/dist/cli/index.d.mts +0 -1
  90. package/dist/config/index.cjs +0 -1
  91. package/dist/config/index.d.cts +0 -47
  92. package/dist/config/preset/auto.d.mts +0 -3
  93. package/dist/config/preset/utils/infer-entries.d.mts +0 -11
  94. package/dist/config/preset/utils/overwrite-with-publish-config.d.mts +0 -4
  95. package/dist/config/utils/find-packem-file.d.mts +0 -2
  96. package/dist/config/utils/load-package-json.d.cts +0 -6
  97. package/dist/config/utils/load-package-json.d.mts +0 -6
  98. package/dist/config/utils/load-package-json.d.ts +0 -6
  99. package/dist/config/utils/load-packem-config.d.mts +0 -7
  100. package/dist/config/utils/load-preset.d.mts +0 -4
  101. package/dist/config/utils/load-tsconfig.d.cts +0 -5
  102. package/dist/config/utils/load-tsconfig.d.mts +0 -5
  103. package/dist/config/utils/load-tsconfig.d.ts +0 -5
  104. package/dist/config/utils/prepare-entries.d.cts +0 -3
  105. package/dist/config/utils/prepare-entries.d.mts +0 -3
  106. package/dist/config/utils/prepare-entries.d.ts +0 -3
  107. package/dist/constants.d.cts +0 -115
  108. package/dist/constants.d.mts +0 -115
  109. package/dist/constants.d.ts +0 -115
  110. package/dist/index.cjs +0 -150
  111. package/dist/index.d.cts +0 -47
  112. package/dist/jit/create-stub.d.cts +0 -3
  113. package/dist/jit/create-stub.d.mts +0 -3
  114. package/dist/jit/create-stub.d.ts +0 -3
  115. package/dist/packem/build.d.cts +0 -20
  116. package/dist/packem/build.d.mts +0 -20
  117. package/dist/packem/build.d.ts +0 -20
  118. package/dist/packem/index.d.cts +0 -25
  119. package/dist/packem/index.d.mts +0 -25
  120. package/dist/packem/index.d.ts +0 -25
  121. package/dist/packem/node10-compatibility.d.cts +0 -6
  122. package/dist/packem/node10-compatibility.d.mts +0 -6
  123. package/dist/packem/node10-compatibility.d.ts +0 -6
  124. package/dist/packem/utils/brotli-size.d.cts +0 -2
  125. package/dist/packem/utils/brotli-size.d.mts +0 -2
  126. package/dist/packem/utils/brotli-size.d.ts +0 -2
  127. package/dist/packem/utils/group-by-keys.d.cts +0 -3
  128. package/dist/packem/utils/group-by-keys.d.mts +0 -3
  129. package/dist/packem/utils/group-by-keys.d.ts +0 -3
  130. package/dist/packem/utils/gzip-size.d.cts +0 -2
  131. package/dist/packem/utils/gzip-size.d.mts +0 -2
  132. package/dist/packem/utils/gzip-size.d.ts +0 -2
  133. package/dist/packem_shared/Mime-DTB1xJuS.cjs +0 -1
  134. package/dist/packem_shared/Mime-FoPIch-Y.mjs +0 -3
  135. package/dist/packem_shared/constants-DHEu5jVJ.mjs +0 -1
  136. package/dist/packem_shared/constants-W_6E3QrV.cjs +0 -1
  137. package/dist/packem_shared/create-or-update-key-storage-BATQud1F.mjs +0 -3
  138. package/dist/packem_shared/create-or-update-key-storage-DKcZnYd5.cjs +0 -3
  139. package/dist/packem_shared/ensure-auto-modules-BU3xWEjl.mjs +0 -1
  140. package/dist/packem_shared/ensure-auto-modules-Cs9762qZ.cjs +0 -1
  141. package/dist/packem_shared/index-0ofbypRE.mjs +0 -1
  142. package/dist/packem_shared/index-C5qgsR90.cjs +0 -1
  143. package/dist/packem_shared/resolve-C7N_MxXM.mjs +0 -1
  144. package/dist/packem_shared/resolve-DSG4Zlek.cjs +0 -1
  145. package/dist/packem_shared/sourcemap-BtmVnsYw.cjs +0 -3
  146. package/dist/packem_shared/sourcemap-Crbje9In.mjs +0 -3
  147. package/dist/packem_shared/url-BJXna-1T.mjs +0 -1
  148. package/dist/packem_shared/url-C84CQz1g.cjs +0 -1
  149. package/dist/rollup/build-types.d.cts +0 -4
  150. package/dist/rollup/build-types.d.mts +0 -4
  151. package/dist/rollup/build-types.d.ts +0 -4
  152. package/dist/rollup/build.d.cts +0 -4
  153. package/dist/rollup/build.d.mts +0 -4
  154. package/dist/rollup/build.d.ts +0 -4
  155. package/dist/rollup/get-rollup-options.d.cts +0 -5
  156. package/dist/rollup/get-rollup-options.d.mts +0 -5
  157. package/dist/rollup/get-rollup-options.d.ts +0 -5
  158. package/dist/rollup/plugins/chunk-splitter/gather.d.cts +0 -8
  159. package/dist/rollup/plugins/chunk-splitter/gather.d.mts +0 -8
  160. package/dist/rollup/plugins/chunk-splitter/gather.d.ts +0 -8
  161. package/dist/rollup/plugins/chunk-splitter/index.d.cts +0 -6
  162. package/dist/rollup/plugins/chunk-splitter/index.d.mts +0 -6
  163. package/dist/rollup/plugins/chunk-splitter/index.d.ts +0 -6
  164. package/dist/rollup/plugins/chunk-splitter/parse/index.d.cts +0 -4
  165. package/dist/rollup/plugins/chunk-splitter/parse/index.d.mts +0 -4
  166. package/dist/rollup/plugins/chunk-splitter/parse/index.d.ts +0 -4
  167. package/dist/rollup/plugins/chunk-splitter/parse/types.d.cts +0 -24
  168. package/dist/rollup/plugins/chunk-splitter/parse/types.d.mts +0 -24
  169. package/dist/rollup/plugins/chunk-splitter/parse/types.d.ts +0 -24
  170. package/dist/rollup/plugins/cjs-interop.d.cts +0 -8
  171. package/dist/rollup/plugins/cjs-interop.d.mts +0 -8
  172. package/dist/rollup/plugins/cjs-interop.d.ts +0 -8
  173. package/dist/rollup/plugins/copy.d.cts +0 -24
  174. package/dist/rollup/plugins/copy.d.mts +0 -24
  175. package/dist/rollup/plugins/copy.d.ts +0 -24
  176. package/dist/rollup/plugins/css/index.d.cts +0 -6
  177. package/dist/rollup/plugins/css/index.d.mts +0 -6
  178. package/dist/rollup/plugins/css/index.d.ts +0 -6
  179. package/dist/rollup/plugins/css/loaders/less/importer.d.cts +0 -2
  180. package/dist/rollup/plugins/css/loaders/less/importer.d.mts +0 -2
  181. package/dist/rollup/plugins/css/loaders/less/importer.d.ts +0 -2
  182. package/dist/rollup/plugins/css/loaders/less/index.cjs +0 -1
  183. package/dist/rollup/plugins/css/loaders/less/index.d.cts +0 -4
  184. package/dist/rollup/plugins/css/loaders/less/index.d.mts +0 -4
  185. package/dist/rollup/plugins/css/loaders/less/index.d.ts +0 -4
  186. package/dist/rollup/plugins/css/loaders/less/index.mjs +0 -1
  187. package/dist/rollup/plugins/css/loaders/less/types.d.cts +0 -2
  188. package/dist/rollup/plugins/css/loaders/less/types.d.mts +0 -2
  189. package/dist/rollup/plugins/css/loaders/less/types.d.ts +0 -2
  190. package/dist/rollup/plugins/css/loaders/lightningcss.cjs +0 -3
  191. package/dist/rollup/plugins/css/loaders/lightningcss.d.cts +0 -4
  192. package/dist/rollup/plugins/css/loaders/loader.d.cts +0 -24
  193. package/dist/rollup/plugins/css/loaders/loader.d.mts +0 -24
  194. package/dist/rollup/plugins/css/loaders/loader.d.ts +0 -24
  195. package/dist/rollup/plugins/css/loaders/postcss/constants.d.cts +0 -3
  196. package/dist/rollup/plugins/css/loaders/postcss/constants.d.mts +0 -3
  197. package/dist/rollup/plugins/css/loaders/postcss/constants.d.ts +0 -3
  198. package/dist/rollup/plugins/css/loaders/postcss/icss/index.d.cts +0 -8
  199. package/dist/rollup/plugins/css/loaders/postcss/icss/index.d.mts +0 -8
  200. package/dist/rollup/plugins/css/loaders/postcss/icss/index.d.ts +0 -8
  201. package/dist/rollup/plugins/css/loaders/postcss/icss/load.d.cts +0 -5
  202. package/dist/rollup/plugins/css/loaders/postcss/icss/load.d.mts +0 -5
  203. package/dist/rollup/plugins/css/loaders/postcss/icss/load.d.ts +0 -5
  204. package/dist/rollup/plugins/css/loaders/postcss/icss/resolve.d.cts +0 -6
  205. package/dist/rollup/plugins/css/loaders/postcss/icss/resolve.d.mts +0 -6
  206. package/dist/rollup/plugins/css/loaders/postcss/icss/resolve.d.ts +0 -6
  207. package/dist/rollup/plugins/css/loaders/postcss/import/apply-conditions.d.cts +0 -10
  208. package/dist/rollup/plugins/css/loaders/postcss/import/apply-conditions.d.mts +0 -10
  209. package/dist/rollup/plugins/css/loaders/postcss/import/apply-conditions.d.ts +0 -10
  210. package/dist/rollup/plugins/css/loaders/postcss/import/apply-raws.d.cts +0 -3
  211. package/dist/rollup/plugins/css/loaders/postcss/import/apply-raws.d.mts +0 -3
  212. package/dist/rollup/plugins/css/loaders/postcss/import/apply-raws.d.ts +0 -3
  213. package/dist/rollup/plugins/css/loaders/postcss/import/apply-styles.d.cts +0 -10
  214. package/dist/rollup/plugins/css/loaders/postcss/import/apply-styles.d.mts +0 -10
  215. package/dist/rollup/plugins/css/loaders/postcss/import/apply-styles.d.ts +0 -10
  216. package/dist/rollup/plugins/css/loaders/postcss/import/constants.d.cts +0 -12
  217. package/dist/rollup/plugins/css/loaders/postcss/import/constants.d.mts +0 -12
  218. package/dist/rollup/plugins/css/loaders/postcss/import/constants.d.ts +0 -12
  219. package/dist/rollup/plugins/css/loaders/postcss/import/import-resolve.d.cts +0 -3
  220. package/dist/rollup/plugins/css/loaders/postcss/import/import-resolve.d.mts +0 -3
  221. package/dist/rollup/plugins/css/loaders/postcss/import/import-resolve.d.ts +0 -3
  222. package/dist/rollup/plugins/css/loaders/postcss/import/index.d.cts +0 -12
  223. package/dist/rollup/plugins/css/loaders/postcss/import/index.d.mts +0 -12
  224. package/dist/rollup/plugins/css/loaders/postcss/import/index.d.ts +0 -12
  225. package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-at-import.d.cts +0 -9
  226. package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-at-import.d.mts +0 -9
  227. package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-at-import.d.ts +0 -9
  228. package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-styles.d.cts +0 -6
  229. package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-styles.d.mts +0 -6
  230. package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-styles.d.ts +0 -6
  231. package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-stylesheet.d.cts +0 -10
  232. package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-stylesheet.d.mts +0 -10
  233. package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-stylesheet.d.ts +0 -10
  234. package/dist/rollup/plugins/css/loaders/postcss/import/types.d.cts +0 -95
  235. package/dist/rollup/plugins/css/loaders/postcss/import/types.d.mts +0 -95
  236. package/dist/rollup/plugins/css/loaders/postcss/import/types.d.ts +0 -95
  237. package/dist/rollup/plugins/css/loaders/postcss/import/utils/base64-encoded-import.d.cts +0 -3
  238. package/dist/rollup/plugins/css/loaders/postcss/import/utils/base64-encoded-import.d.mts +0 -3
  239. package/dist/rollup/plugins/css/loaders/postcss/import/utils/base64-encoded-import.d.ts +0 -3
  240. package/dist/rollup/plugins/css/loaders/postcss/import/utils/data-url.d.cts +0 -2
  241. package/dist/rollup/plugins/css/loaders/postcss/import/utils/data-url.d.mts +0 -2
  242. package/dist/rollup/plugins/css/loaders/postcss/import/utils/data-url.d.ts +0 -2
  243. package/dist/rollup/plugins/css/loaders/postcss/import/utils/format-import-prelude.d.cts +0 -2
  244. package/dist/rollup/plugins/css/loaders/postcss/import/utils/format-import-prelude.d.mts +0 -2
  245. package/dist/rollup/plugins/css/loaders/postcss/import/utils/format-import-prelude.d.ts +0 -2
  246. package/dist/rollup/plugins/css/loaders/postcss/import/utils/load-content.d.cts +0 -2
  247. package/dist/rollup/plugins/css/loaders/postcss/import/utils/load-content.d.mts +0 -2
  248. package/dist/rollup/plugins/css/loaders/postcss/import/utils/load-content.d.ts +0 -2
  249. package/dist/rollup/plugins/css/loaders/postcss/import/utils/process-content.d.cts +0 -4
  250. package/dist/rollup/plugins/css/loaders/postcss/import/utils/process-content.d.mts +0 -4
  251. package/dist/rollup/plugins/css/loaders/postcss/import/utils/process-content.d.ts +0 -4
  252. package/dist/rollup/plugins/css/loaders/postcss/import/utils/statement.d.cts +0 -6
  253. package/dist/rollup/plugins/css/loaders/postcss/import/utils/statement.d.mts +0 -6
  254. package/dist/rollup/plugins/css/loaders/postcss/import/utils/statement.d.ts +0 -6
  255. package/dist/rollup/plugins/css/loaders/postcss/index.cjs +0 -19
  256. package/dist/rollup/plugins/css/loaders/postcss/index.d.cts +0 -4
  257. package/dist/rollup/plugins/css/loaders/postcss/index.d.mts +0 -4
  258. package/dist/rollup/plugins/css/loaders/postcss/index.d.ts +0 -4
  259. package/dist/rollup/plugins/css/loaders/postcss/index.mjs +0 -19
  260. package/dist/rollup/plugins/css/loaders/postcss/load-config.d.cts +0 -5
  261. package/dist/rollup/plugins/css/loaders/postcss/load-config.d.mts +0 -5
  262. package/dist/rollup/plugins/css/loaders/postcss/load-config.d.ts +0 -5
  263. package/dist/rollup/plugins/css/loaders/postcss/modules/generate.d.cts +0 -11
  264. package/dist/rollup/plugins/css/loaders/postcss/modules/generate.d.mts +0 -11
  265. package/dist/rollup/plugins/css/loaders/postcss/modules/generate.d.ts +0 -11
  266. package/dist/rollup/plugins/css/loaders/postcss/modules/index.d.cts +0 -35
  267. package/dist/rollup/plugins/css/loaders/postcss/modules/index.d.mts +0 -35
  268. package/dist/rollup/plugins/css/loaders/postcss/modules/index.d.ts +0 -35
  269. package/dist/rollup/plugins/css/loaders/postcss/noop.d.cts +0 -3
  270. package/dist/rollup/plugins/css/loaders/postcss/noop.d.mts +0 -3
  271. package/dist/rollup/plugins/css/loaders/postcss/noop.d.ts +0 -3
  272. package/dist/rollup/plugins/css/loaders/postcss/url/generate.d.cts +0 -2
  273. package/dist/rollup/plugins/css/loaders/postcss/url/generate.d.mts +0 -2
  274. package/dist/rollup/plugins/css/loaders/postcss/url/generate.d.ts +0 -2
  275. package/dist/rollup/plugins/css/loaders/postcss/url/index.d.cts +0 -46
  276. package/dist/rollup/plugins/css/loaders/postcss/url/index.d.mts +0 -46
  277. package/dist/rollup/plugins/css/loaders/postcss/url/index.d.ts +0 -46
  278. package/dist/rollup/plugins/css/loaders/postcss/url/inline.d.cts +0 -2
  279. package/dist/rollup/plugins/css/loaders/postcss/url/inline.d.mts +0 -2
  280. package/dist/rollup/plugins/css/loaders/postcss/url/inline.d.ts +0 -2
  281. package/dist/rollup/plugins/css/loaders/postcss/url/url-resolve.d.cts +0 -12
  282. package/dist/rollup/plugins/css/loaders/postcss/url/url-resolve.d.mts +0 -12
  283. package/dist/rollup/plugins/css/loaders/postcss/url/url-resolve.d.ts +0 -12
  284. package/dist/rollup/plugins/css/loaders/postcss/url/utils.d.cts +0 -4
  285. package/dist/rollup/plugins/css/loaders/postcss/url/utils.d.mts +0 -4
  286. package/dist/rollup/plugins/css/loaders/postcss/url/utils.d.ts +0 -4
  287. package/dist/rollup/plugins/css/loaders/sass/index.cjs +0 -8
  288. package/dist/rollup/plugins/css/loaders/sass/index.d.cts +0 -4
  289. package/dist/rollup/plugins/css/loaders/sass/index.d.mts +0 -4
  290. package/dist/rollup/plugins/css/loaders/sass/index.d.ts +0 -4
  291. package/dist/rollup/plugins/css/loaders/sass/index.mjs +0 -10
  292. package/dist/rollup/plugins/css/loaders/sass/legacy/importer.d.cts +0 -3
  293. package/dist/rollup/plugins/css/loaders/sass/legacy/importer.d.mts +0 -3
  294. package/dist/rollup/plugins/css/loaders/sass/legacy/importer.d.ts +0 -3
  295. package/dist/rollup/plugins/css/loaders/sass/modern/importer.d.cts +0 -3
  296. package/dist/rollup/plugins/css/loaders/sass/modern/importer.d.mts +0 -3
  297. package/dist/rollup/plugins/css/loaders/sass/modern/importer.d.ts +0 -3
  298. package/dist/rollup/plugins/css/loaders/sass/types.d.cts +0 -22
  299. package/dist/rollup/plugins/css/loaders/sass/types.d.mts +0 -22
  300. package/dist/rollup/plugins/css/loaders/sass/types.d.ts +0 -22
  301. package/dist/rollup/plugins/css/loaders/sass/utils/get-compile-function.d.cts +0 -13
  302. package/dist/rollup/plugins/css/loaders/sass/utils/get-compile-function.d.mts +0 -13
  303. package/dist/rollup/plugins/css/loaders/sass/utils/get-compile-function.d.ts +0 -13
  304. package/dist/rollup/plugins/css/loaders/sass/utils/get-sass-implementation.d.cts +0 -5
  305. package/dist/rollup/plugins/css/loaders/sass/utils/get-sass-implementation.d.mts +0 -5
  306. package/dist/rollup/plugins/css/loaders/sass/utils/get-sass-implementation.d.ts +0 -5
  307. package/dist/rollup/plugins/css/loaders/sass/utils/get-sass-options.d.cts +0 -8
  308. package/dist/rollup/plugins/css/loaders/sass/utils/get-sass-options.d.mts +0 -8
  309. package/dist/rollup/plugins/css/loaders/sass/utils/get-sass-options.d.ts +0 -8
  310. package/dist/rollup/plugins/css/loaders/sass/utils/normalize-source-map.d.cts +0 -3
  311. package/dist/rollup/plugins/css/loaders/sass/utils/normalize-source-map.d.mts +0 -3
  312. package/dist/rollup/plugins/css/loaders/sass/utils/normalize-source-map.d.ts +0 -3
  313. package/dist/rollup/plugins/css/loaders/sass/utils/resolve-syntax.d.cts +0 -2
  314. package/dist/rollup/plugins/css/loaders/sass/utils/resolve-syntax.d.mts +0 -2
  315. package/dist/rollup/plugins/css/loaders/sass/utils/resolve-syntax.d.ts +0 -2
  316. package/dist/rollup/plugins/css/loaders/sass/utils/sass-error-factory.d.cts +0 -15
  317. package/dist/rollup/plugins/css/loaders/sass/utils/sass-error-factory.d.mts +0 -15
  318. package/dist/rollup/plugins/css/loaders/sass/utils/sass-error-factory.d.ts +0 -15
  319. package/dist/rollup/plugins/css/loaders/sourcemap.cjs +0 -1
  320. package/dist/rollup/plugins/css/loaders/sourcemap.d.cts +0 -3
  321. package/dist/rollup/plugins/css/loaders/stylus/index.cjs +0 -1
  322. package/dist/rollup/plugins/css/loaders/stylus/index.d.cts +0 -4
  323. package/dist/rollup/plugins/css/loaders/stylus/index.d.mts +0 -4
  324. package/dist/rollup/plugins/css/loaders/stylus/index.d.ts +0 -4
  325. package/dist/rollup/plugins/css/loaders/stylus/index.mjs +0 -1
  326. package/dist/rollup/plugins/css/loaders/stylus/types.d.cts +0 -3
  327. package/dist/rollup/plugins/css/loaders/stylus/types.d.mts +0 -3
  328. package/dist/rollup/plugins/css/loaders/stylus/types.d.ts +0 -3
  329. package/dist/rollup/plugins/css/loaders/types.d.cts +0 -101
  330. package/dist/rollup/plugins/css/loaders/types.d.mts +0 -101
  331. package/dist/rollup/plugins/css/loaders/types.d.ts +0 -101
  332. package/dist/rollup/plugins/css/loaders/utils/ensure-auto-modules.d.cts +0 -3
  333. package/dist/rollup/plugins/css/loaders/utils/ensure-auto-modules.d.mts +0 -3
  334. package/dist/rollup/plugins/css/loaders/utils/ensure-auto-modules.d.ts +0 -3
  335. package/dist/rollup/plugins/css/loaders/utils/match-file.d.cts +0 -3
  336. package/dist/rollup/plugins/css/loaders/utils/match-file.d.mts +0 -3
  337. package/dist/rollup/plugins/css/loaders/utils/match-file.d.ts +0 -3
  338. package/dist/rollup/plugins/css/minifiers/cssnano.cjs +0 -1
  339. package/dist/rollup/plugins/css/minifiers/cssnano.d.cts +0 -4
  340. package/dist/rollup/plugins/css/minifiers/lightningcss.cjs +0 -3
  341. package/dist/rollup/plugins/css/minifiers/lightningcss.d.cts +0 -4
  342. package/dist/rollup/plugins/css/minifiers/types.d.cts +0 -14
  343. package/dist/rollup/plugins/css/minifiers/types.d.mts +0 -14
  344. package/dist/rollup/plugins/css/minifiers/types.d.ts +0 -14
  345. package/dist/rollup/plugins/css/runtime/inject-css.cjs +0 -1
  346. package/dist/rollup/plugins/css/runtime/inject-css.d.cts +0 -16
  347. package/dist/rollup/plugins/css/runtime/inject-css.d.mts +0 -16
  348. package/dist/rollup/plugins/css/runtime/inject-css.d.ts +0 -16
  349. package/dist/rollup/plugins/css/runtime/inject-css.mjs +0 -1
  350. package/dist/rollup/plugins/css/types.d.cts +0 -213
  351. package/dist/rollup/plugins/css/types.d.mts +0 -213
  352. package/dist/rollup/plugins/css/types.d.ts +0 -213
  353. package/dist/rollup/plugins/css/utils/array-fmt.d.cts +0 -2
  354. package/dist/rollup/plugins/css/utils/array-fmt.d.mts +0 -2
  355. package/dist/rollup/plugins/css/utils/array-fmt.d.ts +0 -2
  356. package/dist/rollup/plugins/css/utils/concat.d.cts +0 -8
  357. package/dist/rollup/plugins/css/utils/concat.d.mts +0 -8
  358. package/dist/rollup/plugins/css/utils/concat.d.ts +0 -8
  359. package/dist/rollup/plugins/css/utils/load-module.d.cts +0 -2
  360. package/dist/rollup/plugins/css/utils/load-module.d.mts +0 -2
  361. package/dist/rollup/plugins/css/utils/load-module.d.ts +0 -2
  362. package/dist/rollup/plugins/css/utils/options.d.cts +0 -18
  363. package/dist/rollup/plugins/css/utils/options.d.mts +0 -18
  364. package/dist/rollup/plugins/css/utils/options.d.ts +0 -18
  365. package/dist/rollup/plugins/css/utils/resolve.d.cts +0 -8
  366. package/dist/rollup/plugins/css/utils/resolve.d.mts +0 -8
  367. package/dist/rollup/plugins/css/utils/resolve.d.ts +0 -8
  368. package/dist/rollup/plugins/css/utils/safe-id.d.cts +0 -2
  369. package/dist/rollup/plugins/css/utils/safe-id.d.mts +0 -2
  370. package/dist/rollup/plugins/css/utils/safe-id.d.ts +0 -2
  371. package/dist/rollup/plugins/css/utils/sourcemap.d.cts +0 -19
  372. package/dist/rollup/plugins/css/utils/sourcemap.d.mts +0 -19
  373. package/dist/rollup/plugins/css/utils/sourcemap.d.ts +0 -19
  374. package/dist/rollup/plugins/css/utils/url.d.cts +0 -8
  375. package/dist/rollup/plugins/css/utils/url.d.mts +0 -8
  376. package/dist/rollup/plugins/css/utils/url.d.ts +0 -8
  377. package/dist/rollup/plugins/css-modules-types.d.cts +0 -5
  378. package/dist/rollup/plugins/css-modules-types.d.mts +0 -5
  379. package/dist/rollup/plugins/css-modules-types.d.ts +0 -5
  380. package/dist/rollup/plugins/esbuild/browserslist-to-esbuild.d.cts +0 -2
  381. package/dist/rollup/plugins/esbuild/browserslist-to-esbuild.d.mts +0 -2
  382. package/dist/rollup/plugins/esbuild/browserslist-to-esbuild.d.ts +0 -2
  383. package/dist/rollup/plugins/esbuild/get-render-chunk.d.cts +0 -14
  384. package/dist/rollup/plugins/esbuild/get-render-chunk.d.mts +0 -14
  385. package/dist/rollup/plugins/esbuild/get-render-chunk.d.ts +0 -14
  386. package/dist/rollup/plugins/esbuild/index.cjs +0 -1
  387. package/dist/rollup/plugins/esbuild/index.d.cts +0 -3
  388. package/dist/rollup/plugins/esbuild/optmize-deps.d.cts +0 -3
  389. package/dist/rollup/plugins/esbuild/optmize-deps.d.mts +0 -3
  390. package/dist/rollup/plugins/esbuild/optmize-deps.d.ts +0 -3
  391. package/dist/rollup/plugins/esbuild/types.d.cts +0 -40
  392. package/dist/rollup/plugins/esbuild/types.d.mts +0 -40
  393. package/dist/rollup/plugins/esbuild/types.d.ts +0 -40
  394. package/dist/rollup/plugins/esbuild/warn.d.cts +0 -4
  395. package/dist/rollup/plugins/esbuild/warn.d.mts +0 -4
  396. package/dist/rollup/plugins/esbuild/warn.d.ts +0 -4
  397. package/dist/rollup/plugins/esm-shim-cjs-syntax.d.cts +0 -9
  398. package/dist/rollup/plugins/esm-shim-cjs-syntax.d.mts +0 -9
  399. package/dist/rollup/plugins/esm-shim-cjs-syntax.d.ts +0 -9
  400. package/dist/rollup/plugins/fix-dts-default-cjs-exports-plugin.d.cts +0 -29
  401. package/dist/rollup/plugins/fix-dts-default-cjs-exports-plugin.d.mts +0 -29
  402. package/dist/rollup/plugins/fix-dts-default-cjs-exports-plugin.d.ts +0 -29
  403. package/dist/rollup/plugins/fix-dynamic-import-extension.d.cts +0 -3
  404. package/dist/rollup/plugins/fix-dynamic-import-extension.d.mts +0 -3
  405. package/dist/rollup/plugins/fix-dynamic-import-extension.d.ts +0 -3
  406. package/dist/rollup/plugins/isolated-declarations/index.d.cts +0 -11
  407. package/dist/rollup/plugins/isolated-declarations/index.d.mts +0 -11
  408. package/dist/rollup/plugins/isolated-declarations/index.d.ts +0 -11
  409. package/dist/rollup/plugins/isolated-declarations/utils/extend-string.d.cts +0 -2
  410. package/dist/rollup/plugins/isolated-declarations/utils/extend-string.d.mts +0 -2
  411. package/dist/rollup/plugins/isolated-declarations/utils/extend-string.d.ts +0 -2
  412. package/dist/rollup/plugins/isolated-declarations/utils/fix-dts-default-cjs-exports.d.cts +0 -35
  413. package/dist/rollup/plugins/isolated-declarations/utils/fix-dts-default-cjs-exports.d.mts +0 -35
  414. package/dist/rollup/plugins/isolated-declarations/utils/fix-dts-default-cjs-exports.d.ts +0 -35
  415. package/dist/rollup/plugins/isolated-declarations/utils/lowest-common-ancestor.d.cts +0 -2
  416. package/dist/rollup/plugins/isolated-declarations/utils/lowest-common-ancestor.d.mts +0 -2
  417. package/dist/rollup/plugins/isolated-declarations/utils/lowest-common-ancestor.d.ts +0 -2
  418. package/dist/rollup/plugins/isolated-declarations/utils/split-tsconfig-path-key.d.cts +0 -2
  419. package/dist/rollup/plugins/isolated-declarations/utils/split-tsconfig-path-key.d.mts +0 -2
  420. package/dist/rollup/plugins/isolated-declarations/utils/split-tsconfig-path-key.d.ts +0 -2
  421. package/dist/rollup/plugins/json.d.cts +0 -4
  422. package/dist/rollup/plugins/json.d.mts +0 -4
  423. package/dist/rollup/plugins/json.d.ts +0 -4
  424. package/dist/rollup/plugins/jsx-remove-attributes.d.cts +0 -8
  425. package/dist/rollup/plugins/jsx-remove-attributes.d.mts +0 -8
  426. package/dist/rollup/plugins/jsx-remove-attributes.d.ts +0 -8
  427. package/dist/rollup/plugins/license.d.cts +0 -18
  428. package/dist/rollup/plugins/license.d.mts +0 -18
  429. package/dist/rollup/plugins/license.d.ts +0 -18
  430. package/dist/rollup/plugins/metafile.d.cts +0 -3
  431. package/dist/rollup/plugins/metafile.d.mts +0 -3
  432. package/dist/rollup/plugins/metafile.d.ts +0 -3
  433. package/dist/rollup/plugins/oxc/isolated-declarations-oxc-transformer.cjs +0 -1
  434. package/dist/rollup/plugins/oxc/isolated-declarations-oxc-transformer.d.cts +0 -4
  435. package/dist/rollup/plugins/oxc/oxc-resolve.d.cts +0 -7
  436. package/dist/rollup/plugins/oxc/oxc-resolve.d.mts +0 -7
  437. package/dist/rollup/plugins/oxc/oxc-resolve.d.ts +0 -7
  438. package/dist/rollup/plugins/oxc/oxc-transformer.cjs +0 -4
  439. package/dist/rollup/plugins/oxc/oxc-transformer.d.cts +0 -3
  440. package/dist/rollup/plugins/oxc/types.d.cts +0 -12
  441. package/dist/rollup/plugins/oxc/types.d.mts +0 -12
  442. package/dist/rollup/plugins/oxc/types.d.ts +0 -12
  443. package/dist/rollup/plugins/plugin-cache.d.cts +0 -11
  444. package/dist/rollup/plugins/plugin-cache.d.mts +0 -11
  445. package/dist/rollup/plugins/plugin-cache.d.ts +0 -11
  446. package/dist/rollup/plugins/preserve-directives.d.cts +0 -17
  447. package/dist/rollup/plugins/preserve-directives.d.mts +0 -17
  448. package/dist/rollup/plugins/preserve-directives.d.ts +0 -17
  449. package/dist/rollup/plugins/raw.d.cts +0 -7
  450. package/dist/rollup/plugins/raw.d.mts +0 -7
  451. package/dist/rollup/plugins/raw.d.ts +0 -7
  452. package/dist/rollup/plugins/resolve-externals-plugin.d.cts +0 -59
  453. package/dist/rollup/plugins/resolve-externals-plugin.d.mts +0 -59
  454. package/dist/rollup/plugins/resolve-externals-plugin.d.ts +0 -59
  455. package/dist/rollup/plugins/resolve-file-url.d.cts +0 -3
  456. package/dist/rollup/plugins/resolve-file-url.d.mts +0 -3
  457. package/dist/rollup/plugins/resolve-file-url.d.ts +0 -3
  458. package/dist/rollup/plugins/shebang.d.cts +0 -9
  459. package/dist/rollup/plugins/shebang.d.mts +0 -9
  460. package/dist/rollup/plugins/shebang.d.ts +0 -9
  461. package/dist/rollup/plugins/source-maps.d.cts +0 -7
  462. package/dist/rollup/plugins/source-maps.d.mts +0 -7
  463. package/dist/rollup/plugins/source-maps.d.ts +0 -7
  464. package/dist/rollup/plugins/sucrase/index.cjs +0 -1
  465. package/dist/rollup/plugins/sucrase/index.d.cts +0 -3
  466. package/dist/rollup/plugins/sucrase/types.d.cts +0 -6
  467. package/dist/rollup/plugins/sucrase/types.d.mts +0 -6
  468. package/dist/rollup/plugins/sucrase/types.d.ts +0 -6
  469. package/dist/rollup/plugins/swc/isolated-declarations-swc-transformer.cjs +0 -1
  470. package/dist/rollup/plugins/swc/isolated-declarations-swc-transformer.d.cts +0 -3
  471. package/dist/rollup/plugins/swc/swc-plugin.cjs +0 -1
  472. package/dist/rollup/plugins/swc/swc-plugin.d.cts +0 -3
  473. package/dist/rollup/plugins/swc/types.d.cts +0 -6
  474. package/dist/rollup/plugins/swc/types.d.mts +0 -6
  475. package/dist/rollup/plugins/swc/types.d.ts +0 -6
  476. package/dist/rollup/plugins/typescript/isolated-declarations-typescript-transformer.cjs +0 -3
  477. package/dist/rollup/plugins/typescript/isolated-declarations-typescript-transformer.d.cts +0 -4
  478. package/dist/rollup/plugins/typescript/patch-typescript-types.d.cts +0 -14
  479. package/dist/rollup/plugins/typescript/patch-typescript-types.d.mts +0 -14
  480. package/dist/rollup/plugins/typescript/patch-typescript-types.d.ts +0 -14
  481. package/dist/rollup/plugins/typescript/resolve-tsconfig-paths-plugin.d.cts +0 -17
  482. package/dist/rollup/plugins/typescript/resolve-tsconfig-paths-plugin.d.mts +0 -17
  483. package/dist/rollup/plugins/typescript/resolve-tsconfig-paths-plugin.d.ts +0 -17
  484. package/dist/rollup/plugins/typescript/resolve-tsconfig-root-dirs.d.cts +0 -25
  485. package/dist/rollup/plugins/typescript/resolve-tsconfig-root-dirs.d.mts +0 -25
  486. package/dist/rollup/plugins/typescript/resolve-tsconfig-root-dirs.d.ts +0 -25
  487. package/dist/rollup/plugins/typescript/resolve-typescript-mjs-cjs.d.cts +0 -10
  488. package/dist/rollup/plugins/typescript/resolve-typescript-mjs-cjs.d.mts +0 -10
  489. package/dist/rollup/plugins/typescript/resolve-typescript-mjs-cjs.d.ts +0 -10
  490. package/dist/rollup/plugins/url.d.cts +0 -72
  491. package/dist/rollup/plugins/url.d.mts +0 -72
  492. package/dist/rollup/plugins/url.d.ts +0 -72
  493. package/dist/rollup/utils/chunks/create-split-chunks.d.cts +0 -4
  494. package/dist/rollup/utils/chunks/create-split-chunks.d.mts +0 -4
  495. package/dist/rollup/utils/chunks/create-split-chunks.d.ts +0 -4
  496. package/dist/rollup/utils/chunks/get-custom-module-layer.d.cts +0 -2
  497. package/dist/rollup/utils/chunks/get-custom-module-layer.d.mts +0 -2
  498. package/dist/rollup/utils/chunks/get-custom-module-layer.d.ts +0 -2
  499. package/dist/rollup/utils/chunks/get-module-layer.d.cts +0 -10
  500. package/dist/rollup/utils/chunks/get-module-layer.d.mts +0 -10
  501. package/dist/rollup/utils/chunks/get-module-layer.d.ts +0 -10
  502. package/dist/rollup/utils/get-chunk-filename.d.cts +0 -3
  503. package/dist/rollup/utils/get-chunk-filename.d.mts +0 -3
  504. package/dist/rollup/utils/get-chunk-filename.d.ts +0 -3
  505. package/dist/rollup/utils/get-entry-file-names.d.cts +0 -3
  506. package/dist/rollup/utils/get-entry-file-names.d.mts +0 -3
  507. package/dist/rollup/utils/get-entry-file-names.d.ts +0 -3
  508. package/dist/rollup/utils/get-hash.d.cts +0 -2
  509. package/dist/rollup/utils/get-hash.d.mts +0 -2
  510. package/dist/rollup/utils/get-hash.d.ts +0 -2
  511. package/dist/rollup/utils/resolve-aliases.d.cts +0 -4
  512. package/dist/rollup/utils/resolve-aliases.d.mts +0 -4
  513. package/dist/rollup/utils/resolve-aliases.d.ts +0 -4
  514. package/dist/rollup/utils/sort-user-plugins.d.cts +0 -4
  515. package/dist/rollup/utils/sort-user-plugins.d.mts +0 -4
  516. package/dist/rollup/utils/sort-user-plugins.d.ts +0 -4
  517. package/dist/rollup/utils/svg-encoder.d.cts +0 -2
  518. package/dist/rollup/utils/svg-encoder.d.mts +0 -2
  519. package/dist/rollup/utils/svg-encoder.d.ts +0 -2
  520. package/dist/rollup/watch.d.cts +0 -4
  521. package/dist/rollup/watch.d.mts +0 -4
  522. package/dist/rollup/watch.d.ts +0 -4
  523. package/dist/types.d.cts +0 -367
  524. package/dist/types.d.mts +0 -367
  525. package/dist/types.d.ts +0 -367
  526. package/dist/utils/arrayify.d.cts +0 -2
  527. package/dist/utils/arrayify.d.mts +0 -2
  528. package/dist/utils/arrayify.d.ts +0 -2
  529. package/dist/utils/clean-distribution-directories.d.cts +0 -3
  530. package/dist/utils/clean-distribution-directories.d.mts +0 -3
  531. package/dist/utils/clean-distribution-directories.d.ts +0 -3
  532. package/dist/utils/create-or-update-key-storage.d.cts +0 -3
  533. package/dist/utils/create-or-update-key-storage.d.mts +0 -3
  534. package/dist/utils/create-or-update-key-storage.d.ts +0 -3
  535. package/dist/utils/enhance-rollup-error.d.cts +0 -3
  536. package/dist/utils/enhance-rollup-error.d.mts +0 -3
  537. package/dist/utils/enhance-rollup-error.d.ts +0 -3
  538. package/dist/utils/extract-export-filenames.d.cts +0 -14
  539. package/dist/utils/extract-export-filenames.d.mts +0 -14
  540. package/dist/utils/extract-export-filenames.d.ts +0 -14
  541. package/dist/utils/file-cache.d.cts +0 -12
  542. package/dist/utils/file-cache.d.mts +0 -12
  543. package/dist/utils/file-cache.d.ts +0 -12
  544. package/dist/utils/find-alternatives.d.cts +0 -2
  545. package/dist/utils/find-alternatives.d.mts +0 -2
  546. package/dist/utils/find-alternatives.d.ts +0 -2
  547. package/dist/utils/get-package-name.d.cts +0 -2
  548. package/dist/utils/get-package-name.d.mts +0 -2
  549. package/dist/utils/get-package-name.d.ts +0 -2
  550. package/dist/utils/get-package-side-effect.d.cts +0 -3
  551. package/dist/utils/get-package-side-effect.d.mts +0 -3
  552. package/dist/utils/get-package-side-effect.d.ts +0 -3
  553. package/dist/utils/infer-export-type.d.cts +0 -3
  554. package/dist/utils/infer-export-type.d.mts +0 -3
  555. package/dist/utils/infer-export-type.d.ts +0 -3
  556. package/dist/utils/kill-process.d.cts +0 -14
  557. package/dist/utils/kill-process.d.mts +0 -14
  558. package/dist/utils/kill-process.d.ts +0 -14
  559. package/dist/utils/log-build-errors.d.cts +0 -3
  560. package/dist/utils/log-build-errors.d.mts +0 -3
  561. package/dist/utils/log-build-errors.d.ts +0 -3
  562. package/dist/utils/memoize.d.cts +0 -12
  563. package/dist/utils/memoize.d.mts +0 -12
  564. package/dist/utils/memoize.d.ts +0 -12
  565. package/dist/utils/remove-old-cache-folders.d.cts +0 -3
  566. package/dist/utils/remove-old-cache-folders.d.mts +0 -3
  567. package/dist/utils/remove-old-cache-folders.d.ts +0 -3
  568. package/dist/utils/replace-content-within-marker.d.cts +0 -2
  569. package/dist/utils/replace-content-within-marker.d.mts +0 -2
  570. package/dist/utils/replace-content-within-marker.d.ts +0 -2
  571. package/dist/utils/warn.d.cts +0 -3
  572. package/dist/utils/warn.d.mts +0 -3
  573. package/dist/utils/warn.d.ts +0 -3
  574. package/dist/validator/package-json/index.d.cts +0 -3
  575. package/dist/validator/package-json/index.d.mts +0 -3
  576. package/dist/validator/package-json/index.d.ts +0 -3
  577. package/dist/validator/package-json/validate-dependencies.d.cts +0 -3
  578. package/dist/validator/package-json/validate-dependencies.d.mts +0 -3
  579. package/dist/validator/package-json/validate-dependencies.d.ts +0 -3
  580. package/dist/validator/package-json/validate-engines.d.cts +0 -3
  581. package/dist/validator/package-json/validate-engines.d.mts +0 -3
  582. package/dist/validator/package-json/validate-engines.d.ts +0 -3
  583. package/dist/validator/package-json/validate-package-entries.d.cts +0 -3
  584. package/dist/validator/package-json/validate-package-entries.d.mts +0 -3
  585. package/dist/validator/package-json/validate-package-entries.d.ts +0 -3
  586. package/dist/validator/package-json/validate-package-fields.d.cts +0 -3
  587. package/dist/validator/package-json/validate-package-fields.d.mts +0 -3
  588. package/dist/validator/package-json/validate-package-fields.d.ts +0 -3
  589. package/dist/validator/validate-alias-entries.d.cts +0 -3
  590. package/dist/validator/validate-alias-entries.d.mts +0 -3
  591. package/dist/validator/validate-alias-entries.d.ts +0 -3
  592. package/dist/validator/validate-bundle-size.d.cts +0 -3
  593. package/dist/validator/validate-bundle-size.d.mts +0 -3
  594. package/dist/validator/validate-bundle-size.d.ts +0 -3
@@ -0,0 +1,2765 @@
1
+ import { I as IsolatedDeclarationsTransformer, P as PackemRollupOptions, T as TransformerFn, c as InternalOXCTransformPluginConfig, a as TransformerName } from './index-Sedl0fV9.js';
2
+ import { PackageJson } from '@visulima/package';
3
+ import { AnsiColors } from '@visulima/colorize';
4
+ import { RollupBuild, RollupOptions, RollupWatcher } from 'rollup';
5
+ import { StyleOptions } from '@visulima/rollup-css-plugin';
6
+ import { JitiOptions as JitiOptions$1 } from 'jiti';
7
+ import { TypeDocOptions } from 'typedoc';
8
+
9
+ interface RollupLogger {
10
+ debug: (log: {
11
+ [key: string]: unknown;
12
+ message: string;
13
+ }) => void;
14
+ error: (log: {
15
+ [key: string]: unknown;
16
+ message: string;
17
+ }) => void;
18
+ info: (log: {
19
+ [key: string]: unknown;
20
+ message: string;
21
+ }) => void;
22
+ warn: (log: {
23
+ [key: string]: unknown;
24
+ message: string;
25
+ }) => void;
26
+ }
27
+
28
+ declare class FileCache {
29
+ #private;
30
+ constructor(cwd: string, cachePath: string | undefined, hashKey: string, logger: RollupLogger);
31
+ set isEnabled(value: boolean);
32
+ get isEnabled(): boolean;
33
+ has(name: string, subDirectory?: string): boolean;
34
+ get<R>(name: string, subDirectory?: string): R | undefined;
35
+ set(name: string, data: ArrayBuffer | ArrayBufferView | boolean | number | object | string | null | undefined, subDirectory?: string): void;
36
+ private getFilePath;
37
+ }
38
+
39
+ /**
40
+ Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
41
+
42
+ @category Type
43
+ */
44
+ type Primitive =
45
+ | null
46
+ | undefined
47
+ | string
48
+ | number
49
+ | boolean
50
+ | symbol
51
+ | bigint;
52
+
53
+ declare global {
54
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
55
+ interface SymbolConstructor {
56
+ readonly observable: symbol;
57
+ }
58
+ }
59
+
60
+ /**
61
+ Allows creating a union type by combining primitive types and literal types without sacrificing auto-completion in IDEs for the literal type part of the union.
62
+
63
+ Currently, when a union type of a primitive type is combined with literal types, TypeScript loses all information about the combined literals. Thus, when such type is used in an IDE with autocompletion, no suggestions are made for the declared literals.
64
+
65
+ This type is a workaround for [Microsoft/TypeScript#29729](https://github.com/Microsoft/TypeScript/issues/29729). It will be removed as soon as it's not needed anymore.
66
+
67
+ @example
68
+ ```
69
+ import type {LiteralUnion} from 'type-fest';
70
+
71
+ // Before
72
+
73
+ type Pet = 'dog' | 'cat' | string;
74
+
75
+ const pet: Pet = '';
76
+ // Start typing in your TypeScript-enabled IDE.
77
+ // You **will not** get auto-completion for `dog` and `cat` literals.
78
+
79
+ // After
80
+
81
+ type Pet2 = LiteralUnion<'dog' | 'cat', string>;
82
+
83
+ const pet: Pet2 = '';
84
+ // You **will** get auto-completion for `dog` and `cat` literals.
85
+ ```
86
+
87
+ @category Type
88
+ */
89
+ type LiteralUnion<
90
+ LiteralType,
91
+ BaseType extends Primitive,
92
+ > = LiteralType | (BaseType & Record<never, never>);
93
+
94
+ declare class InteractiveStreamHook {
95
+ #private;
96
+ static readonly DRAIN = true;
97
+ constructor(stream: NodeJS.WriteStream);
98
+ active(): void;
99
+ erase(count: number): void;
100
+ inactive(separateHistory?: boolean): void;
101
+ renew(): void;
102
+ write(message: string): void;
103
+ }
104
+
105
+ type StreamType = "stderr" | "stdout";
106
+ declare class InteractiveManager {
107
+ #private;
108
+ constructor(stdout: InteractiveStreamHook, stderr: InteractiveStreamHook);
109
+ get lastLength(): number;
110
+ get outside(): number;
111
+ get isHooked(): boolean;
112
+ get isSuspended(): boolean;
113
+ erase(stream: StreamType, count?: number): void;
114
+ hook(): boolean;
115
+ resume(stream: StreamType, eraseRowCount?: number): void;
116
+ suspend(stream: StreamType, erase?: boolean): void;
117
+ unhook(separateHistory?: boolean): boolean;
118
+ update(stream: StreamType, rows: string[], from?: number): void;
119
+ private _clear;
120
+ }
121
+
122
+ declare global {
123
+ namespace VisulimaPail {
124
+ interface CustomMeta<L> {
125
+ }
126
+ }
127
+ }
128
+ interface Meta<L> extends VisulimaPail.CustomMeta<L> {
129
+ badge: string | undefined;
130
+ context: any[] | undefined;
131
+ date: Date | string;
132
+ error: Error | undefined;
133
+ groups: string[];
134
+ label: string | undefined;
135
+ message: Primitive | ReadonlyArray<unknown> | Record<PropertyKey, unknown>;
136
+ prefix: string | undefined;
137
+ repeated?: number | undefined;
138
+ scope: string[] | undefined;
139
+ suffix: string | undefined;
140
+ traceError: Error | undefined;
141
+ type: {
142
+ level: ExtendedRfc5424LogLevels | L;
143
+ name: string;
144
+ };
145
+ }
146
+ type ExtendedRfc5424LogLevels = "alert" | "critical" | "debug" | "emergency" | "error" | "informational" | "notice" | "trace" | "warning";
147
+ type DefaultLogTypes = "alert" | "await" | "complete" | "critical" | "debug" | "emergency" | "error" | "info" | "log" | "notice" | "pending" | "start" | "stop" | "success" | "trace" | "wait" | "warn" | "watch";
148
+ interface LoggerFunction {
149
+ (message: Message): void;
150
+ (...message: any[]): void;
151
+ }
152
+ interface LoggerConfiguration<L extends string> {
153
+ badge?: string;
154
+ color?: AnsiColors | undefined;
155
+ label: string;
156
+ logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>;
157
+ }
158
+ type LoggerTypesConfig<T extends string, L extends string> = Record<T, Partial<LoggerConfiguration<L>>>;
159
+ type ReadonlyMeta<L extends string> = Readonly<Meta<L>>;
160
+ interface Reporter<L extends string> {
161
+ log: (meta: ReadonlyMeta<L>) => void;
162
+ }
163
+ interface Processor<L extends string> {
164
+ process: (meta: Meta<L>) => Meta<L>;
165
+ }
166
+ interface ConstructorOptions<T extends string, L extends string> {
167
+ disabled?: boolean;
168
+ logLevel?: LiteralUnion<ExtendedRfc5424LogLevels, L>;
169
+ logLevels?: Partial<Record<ExtendedRfc5424LogLevels, number>> & Record<L, number>;
170
+ messages?: {
171
+ timerEnd?: string;
172
+ timerStart?: string;
173
+ };
174
+ processors?: Processor<L>[];
175
+ rawReporter?: Reporter<L>;
176
+ reporters?: Reporter<L>[];
177
+ scope?: string[] | string;
178
+ throttle?: number;
179
+ throttleMin?: number;
180
+ types?: LoggerTypesConfig<T, L> & Partial<LoggerTypesConfig<DefaultLogTypes, L>>;
181
+ }
182
+ interface ServerConstructorOptions<T extends string, L extends string> extends ConstructorOptions<T, L> {
183
+ interactive?: boolean;
184
+ stderr: NodeJS.WriteStream;
185
+ stdout: NodeJS.WriteStream;
186
+ }
187
+ type Message = {
188
+ context?: any[] | undefined;
189
+ message: any;
190
+ prefix?: string;
191
+ suffix?: string;
192
+ };
193
+
194
+ type Replacer = (number | string)[] | null | undefined | ((key: string, value: unknown) => string | number | boolean | null | object)
195
+
196
+ interface StringifyOptions {
197
+ bigint?: boolean,
198
+ circularValue?: string | null | TypeErrorConstructor | ErrorConstructor,
199
+ deterministic?: boolean | ((a: string, b: string) => number),
200
+ maximumBreadth?: number,
201
+ maximumDepth?: number,
202
+ strict?: boolean,
203
+ }
204
+
205
+ declare function stringify(value: undefined | symbol | ((...args: unknown[]) => unknown), replacer?: Replacer, space?: string | number): undefined
206
+ declare function stringify(value: string | number | unknown[] | null | boolean | object, replacer?: Replacer, space?: string | number): string
207
+ declare function stringify(value: unknown, replacer?: ((key: string, value: unknown) => unknown) | (number | string)[] | null | undefined, space?: string | number): string | undefined
208
+
209
+ declare namespace stringify {
210
+ export function configure(options: StringifyOptions): typeof stringify
211
+ }
212
+
213
+ declare class PailBrowserImpl<T extends string = string, L extends string = string> {
214
+ protected timersMap: Map<string, number>;
215
+ protected countMap: Map<string, number>;
216
+ protected seqTimers: Set<string>;
217
+ protected readonly lastLog: {
218
+ count?: number;
219
+ object?: Meta<L>;
220
+ serialized?: string;
221
+ time?: Date;
222
+ timeout?: ReturnType<typeof setTimeout>;
223
+ };
224
+ protected readonly logLevels: Record<string, number>;
225
+ protected disabled: boolean;
226
+ protected scopeName: string[];
227
+ protected readonly types: LoggerTypesConfig<LiteralUnion<DefaultLogTypes, T>, L>;
228
+ protected readonly longestLabel: string;
229
+ protected readonly processors: Set<Processor<L>>;
230
+ protected readonly generalLogLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>;
231
+ protected reporters: Set<Reporter<L>>;
232
+ protected readonly throttle: number;
233
+ protected readonly throttleMin: number;
234
+ protected readonly stringify: typeof stringify;
235
+ protected groups: string[];
236
+ protected readonly startTimerMessage: string;
237
+ protected readonly endTimerMessage: string;
238
+ protected rawReporter: Reporter<L>;
239
+ constructor(options: ConstructorOptions<T, L>);
240
+ wrapConsole(): void;
241
+ restoreConsole(): void;
242
+ wrapException(): void;
243
+ disable(): void;
244
+ enable(): void;
245
+ isEnabled(): boolean;
246
+ scope<N extends string = T>(...name: string[]): PailBrowserType<N, L>;
247
+ unscope(): void;
248
+ time(label?: string): void;
249
+ timeLog(label?: string, ...data: unknown[]): void;
250
+ timeEnd(label?: string): void;
251
+ group(label?: string): void;
252
+ groupEnd(): void;
253
+ count(label?: string): void;
254
+ countReset(label?: string): void;
255
+ clear(): void;
256
+ raw(message: string, ...arguments_: unknown[]): void;
257
+ protected extendReporter(reporter: Reporter<L>): Reporter<L>;
258
+ protected registerReporters(reporters: Reporter<L>[]): void;
259
+ private _report;
260
+ private registerProcessors;
261
+ private _normalizeLogLevel;
262
+ private _buildMeta;
263
+ private _logger;
264
+ }
265
+ type PailBrowserType<T extends string = string, L extends string = string> = PailBrowserImpl<T, L> & Record<DefaultLogTypes, LoggerFunction> & Record<T, LoggerFunction> & (new <TC extends string = string, LC extends string = string>(options?: ConstructorOptions<TC, LC>) => PailBrowserType<TC, LC>);
266
+
267
+ declare class PailServerImpl<T extends string = string, L extends string = string> extends PailBrowserImpl<T, L> {
268
+ readonly options: ServerConstructorOptions<T, L>;
269
+ protected readonly stdout: NodeJS.WriteStream;
270
+ protected readonly stderr: NodeJS.WriteStream;
271
+ protected interactiveManager: InteractiveManager | undefined;
272
+ protected readonly interactive: boolean;
273
+ constructor(options: ServerConstructorOptions<T, L>);
274
+ scope<N extends string = T>(...name: string[]): PailServerType<N, L>;
275
+ getInteractiveManager(): InteractiveManager | undefined;
276
+ wrapStd(): void;
277
+ restoreStd(): void;
278
+ wrapAll(): void;
279
+ restoreAll(): void;
280
+ clear(): void;
281
+ protected extendReporter(reporter: Reporter<L>): Reporter<L>;
282
+ private _wrapStream;
283
+ private _restoreStream;
284
+ }
285
+ type PailServerType<T extends string = string, L extends string = string> = PailServerImpl<T, L> & Record<DefaultLogTypes, LoggerFunction> & Record<T, LoggerFunction> & (new <TC extends string = string, LC extends string = string>(options?: ServerConstructorOptions<TC, LC>) => PailServerType<TC, LC>);
286
+
287
+ declare global {
288
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
289
+ interface SymbolConstructor {
290
+ readonly observable: symbol;
291
+ }
292
+ }
293
+
294
+ /**
295
+ Extract all optional keys from the given type.
296
+
297
+ This is useful when you want to create a new type that contains different type values for the optional keys only.
298
+
299
+ @example
300
+ ```
301
+ import type {OptionalKeysOf, Except} from 'type-fest';
302
+
303
+ interface User {
304
+ name: string;
305
+ surname: string;
306
+
307
+ luckyNumber?: number;
308
+ }
309
+
310
+ const REMOVE_FIELD = Symbol('remove field symbol');
311
+ type UpdateOperation<Entity extends object> = Except<Partial<Entity>, OptionalKeysOf<Entity>> & {
312
+ [Key in OptionalKeysOf<Entity>]?: Entity[Key] | typeof REMOVE_FIELD;
313
+ };
314
+
315
+ const update1: UpdateOperation<User> = {
316
+ name: 'Alice'
317
+ };
318
+
319
+ const update2: UpdateOperation<User> = {
320
+ name: 'Bob',
321
+ luckyNumber: REMOVE_FIELD
322
+ };
323
+ ```
324
+
325
+ @category Utilities
326
+ */
327
+ type OptionalKeysOf<BaseType extends object> =
328
+ BaseType extends unknown // For distributing `BaseType`
329
+ ? (keyof {
330
+ [Key in keyof BaseType as BaseType extends Record<Key, BaseType[Key]> ? never : Key]: never
331
+ }) & (keyof BaseType) // Intersect with `keyof BaseType` to ensure result of `OptionalKeysOf<BaseType>` is always assignable to `keyof BaseType`
332
+ : never; // Should never happen
333
+
334
+ /**
335
+ Extract all required keys from the given type.
336
+
337
+ This is useful when you want to create a new type that contains different type values for the required keys only or use the list of keys for validation purposes, etc...
338
+
339
+ @example
340
+ ```
341
+ import type {RequiredKeysOf} from 'type-fest';
342
+
343
+ declare function createValidation<Entity extends object, Key extends RequiredKeysOf<Entity> = RequiredKeysOf<Entity>>(field: Key, validator: (value: Entity[Key]) => boolean): ValidatorFn;
344
+
345
+ interface User {
346
+ name: string;
347
+ surname: string;
348
+
349
+ luckyNumber?: number;
350
+ }
351
+
352
+ const validator1 = createValidation<User>('name', value => value.length < 25);
353
+ const validator2 = createValidation<User>('surname', value => value.length < 25);
354
+ ```
355
+
356
+ @category Utilities
357
+ */
358
+ type RequiredKeysOf<BaseType extends object> =
359
+ BaseType extends unknown // For distributing `BaseType`
360
+ ? Exclude<keyof BaseType, OptionalKeysOf<BaseType>>
361
+ : never; // Should never happen
362
+
363
+ /**
364
+ Returns a boolean for whether the given type is `never`.
365
+
366
+ @link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
367
+ @link https://stackoverflow.com/a/53984913/10292952
368
+ @link https://www.zhenghao.io/posts/ts-never
369
+
370
+ Useful in type utilities, such as checking if something does not occur.
371
+
372
+ @example
373
+ ```
374
+ import type {IsNever, And} from 'type-fest';
375
+
376
+ // https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
377
+ type AreStringsEqual<A extends string, B extends string> =
378
+ And<
379
+ IsNever<Exclude<A, B>> extends true ? true : false,
380
+ IsNever<Exclude<B, A>> extends true ? true : false
381
+ >;
382
+
383
+ type EndIfEqual<I extends string, O extends string> =
384
+ AreStringsEqual<I, O> extends true
385
+ ? never
386
+ : void;
387
+
388
+ function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
389
+ if (input === output) {
390
+ process.exit(0);
391
+ }
392
+ }
393
+
394
+ endIfEqual('abc', 'abc');
395
+ //=> never
396
+
397
+ endIfEqual('abc', '123');
398
+ //=> void
399
+ ```
400
+
401
+ @category Type Guard
402
+ @category Utilities
403
+ */
404
+ type IsNever<T> = [T] extends [never] ? true : false;
405
+
406
+ /**
407
+ An if-else-like type that resolves depending on whether the given type is `never`.
408
+
409
+ @see {@link IsNever}
410
+
411
+ @example
412
+ ```
413
+ import type {IfNever} from 'type-fest';
414
+
415
+ type ShouldBeTrue = IfNever<never>;
416
+ //=> true
417
+
418
+ type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
419
+ //=> 'bar'
420
+ ```
421
+
422
+ @category Type Guard
423
+ @category Utilities
424
+ */
425
+ type IfNever<T, TypeIfNever = true, TypeIfNotNever = false> = (
426
+ IsNever<T> extends true ? TypeIfNever : TypeIfNotNever
427
+ );
428
+
429
+ // Can eventually be replaced with the built-in once this library supports
430
+ // TS5.4+ only. Tracked in https://github.com/sindresorhus/type-fest/issues/848
431
+ type NoInfer<T> = T extends infer U ? U : never;
432
+
433
+ /**
434
+ Returns a boolean for whether the given type is `any`.
435
+
436
+ @link https://stackoverflow.com/a/49928360/1490091
437
+
438
+ Useful in type utilities, such as disallowing `any`s to be passed to a function.
439
+
440
+ @example
441
+ ```
442
+ import type {IsAny} from 'type-fest';
443
+
444
+ const typedObject = {a: 1, b: 2} as const;
445
+ const anyObject: any = {a: 1, b: 2};
446
+
447
+ function get<O extends (IsAny<O> extends true ? {} : Record<string, number>), K extends keyof O = keyof O>(obj: O, key: K) {
448
+ return obj[key];
449
+ }
450
+
451
+ const typedA = get(typedObject, 'a');
452
+ //=> 1
453
+
454
+ const anyA = get(anyObject, 'a');
455
+ //=> any
456
+ ```
457
+
458
+ @category Type Guard
459
+ @category Utilities
460
+ */
461
+ type IsAny<T> = 0 extends 1 & NoInfer<T> ? true : false;
462
+
463
+ /**
464
+ Returns a boolean for whether the two given types are equal.
465
+
466
+ @link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
467
+ @link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
468
+
469
+ Use-cases:
470
+ - If you want to make a conditional branch based on the result of a comparison of two types.
471
+
472
+ @example
473
+ ```
474
+ import type {IsEqual} from 'type-fest';
475
+
476
+ // This type returns a boolean for whether the given array includes the given item.
477
+ // `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
478
+ type Includes<Value extends readonly any[], Item> =
479
+ Value extends readonly [Value[0], ...infer rest]
480
+ ? IsEqual<Value[0], Item> extends true
481
+ ? true
482
+ : Includes<rest, Item>
483
+ : false;
484
+ ```
485
+
486
+ @category Type Guard
487
+ @category Utilities
488
+ */
489
+ type IsEqual<A, B> =
490
+ (<G>() => G extends A & G | G ? 1 : 2) extends
491
+ (<G>() => G extends B & G | G ? 1 : 2)
492
+ ? true
493
+ : false;
494
+
495
+ /**
496
+ Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
497
+
498
+ @example
499
+ ```
500
+ import type {Simplify} from 'type-fest';
501
+
502
+ type PositionProps = {
503
+ top: number;
504
+ left: number;
505
+ };
506
+
507
+ type SizeProps = {
508
+ width: number;
509
+ height: number;
510
+ };
511
+
512
+ // In your editor, hovering over `Props` will show a flattened object with all the properties.
513
+ type Props = Simplify<PositionProps & SizeProps>;
514
+ ```
515
+
516
+ Sometimes it is desired to pass a value as a function argument that has a different type. At first inspection it may seem assignable, and then you discover it is not because the `value`'s type definition was defined as an interface. In the following example, `fn` requires an argument of type `Record<string, unknown>`. If the value is defined as a literal, then it is assignable. And if the `value` is defined as type using the `Simplify` utility the value is assignable. But if the `value` is defined as an interface, it is not assignable because the interface is not sealed and elsewhere a non-string property could be added to the interface.
517
+
518
+ If the type definition must be an interface (perhaps it was defined in a third-party npm package), then the `value` can be defined as `const value: Simplify<SomeInterface> = ...`. Then `value` will be assignable to the `fn` argument. Or the `value` can be cast as `Simplify<SomeInterface>` if you can't re-declare the `value`.
519
+
520
+ @example
521
+ ```
522
+ import type {Simplify} from 'type-fest';
523
+
524
+ interface SomeInterface {
525
+ foo: number;
526
+ bar?: string;
527
+ baz: number | undefined;
528
+ }
529
+
530
+ type SomeType = {
531
+ foo: number;
532
+ bar?: string;
533
+ baz: number | undefined;
534
+ };
535
+
536
+ const literal = {foo: 123, bar: 'hello', baz: 456};
537
+ const someType: SomeType = literal;
538
+ const someInterface: SomeInterface = literal;
539
+
540
+ function fn(object: Record<string, unknown>): void {}
541
+
542
+ fn(literal); // Good: literal object type is sealed
543
+ fn(someType); // Good: type is sealed
544
+ fn(someInterface); // Error: Index signature for type 'string' is missing in type 'someInterface'. Because `interface` can be re-opened
545
+ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface` into a `type`
546
+ ```
547
+
548
+ @link https://github.com/microsoft/TypeScript/issues/15300
549
+ @see SimplifyDeep
550
+ @category Object
551
+ */
552
+ type Simplify<T> = {[KeyType in keyof T]: T[KeyType]} & {};
553
+
554
+ /**
555
+ Omit any index signatures from the given object type, leaving only explicitly defined properties.
556
+
557
+ This is the counterpart of `PickIndexSignature`.
558
+
559
+ Use-cases:
560
+ - Remove overly permissive signatures from third-party types.
561
+
562
+ This type was taken from this [StackOverflow answer](https://stackoverflow.com/a/68261113/420747).
563
+
564
+ It relies on the fact that an empty object (`{}`) is assignable to an object with just an index signature, like `Record<string, unknown>`, but not to an object with explicitly defined keys, like `Record<'foo' | 'bar', unknown>`.
565
+
566
+ (The actual value type, `unknown`, is irrelevant and could be any type. Only the key type matters.)
567
+
568
+ ```
569
+ const indexed: Record<string, unknown> = {}; // Allowed
570
+
571
+ const keyed: Record<'foo', unknown> = {}; // Error
572
+ // => TS2739: Type '{}' is missing the following properties from type 'Record<"foo" | "bar", unknown>': foo, bar
573
+ ```
574
+
575
+ Instead of causing a type error like the above, you can also use a [conditional type](https://www.typescriptlang.org/docs/handbook/2/conditional-types.html) to test whether a type is assignable to another:
576
+
577
+ ```
578
+ type Indexed = {} extends Record<string, unknown>
579
+ ? '✅ `{}` is assignable to `Record<string, unknown>`'
580
+ : '❌ `{}` is NOT assignable to `Record<string, unknown>`';
581
+ // => '✅ `{}` is assignable to `Record<string, unknown>`'
582
+
583
+ type Keyed = {} extends Record<'foo' | 'bar', unknown>
584
+ ? "✅ `{}` is assignable to `Record<'foo' | 'bar', unknown>`"
585
+ : "❌ `{}` is NOT assignable to `Record<'foo' | 'bar', unknown>`";
586
+ // => "❌ `{}` is NOT assignable to `Record<'foo' | 'bar', unknown>`"
587
+ ```
588
+
589
+ Using a [mapped type](https://www.typescriptlang.org/docs/handbook/2/mapped-types.html#further-exploration), you can then check for each `KeyType` of `ObjectType`...
590
+
591
+ ```
592
+ import type {OmitIndexSignature} from 'type-fest';
593
+
594
+ type OmitIndexSignature<ObjectType> = {
595
+ [KeyType in keyof ObjectType // Map each key of `ObjectType`...
596
+ ]: ObjectType[KeyType]; // ...to its original value, i.e. `OmitIndexSignature<Foo> == Foo`.
597
+ };
598
+ ```
599
+
600
+ ...whether an empty object (`{}`) would be assignable to an object with that `KeyType` (`Record<KeyType, unknown>`)...
601
+
602
+ ```
603
+ import type {OmitIndexSignature} from 'type-fest';
604
+
605
+ type OmitIndexSignature<ObjectType> = {
606
+ [KeyType in keyof ObjectType
607
+ // Is `{}` assignable to `Record<KeyType, unknown>`?
608
+ as {} extends Record<KeyType, unknown>
609
+ ? ... // ✅ `{}` is assignable to `Record<KeyType, unknown>`
610
+ : ... // ❌ `{}` is NOT assignable to `Record<KeyType, unknown>`
611
+ ]: ObjectType[KeyType];
612
+ };
613
+ ```
614
+
615
+ If `{}` is assignable, it means that `KeyType` is an index signature and we want to remove it. If it is not assignable, `KeyType` is a "real" key and we want to keep it.
616
+
617
+ @example
618
+ ```
619
+ import type {OmitIndexSignature} from 'type-fest';
620
+
621
+ interface Example {
622
+ // These index signatures will be removed.
623
+ [x: string]: any
624
+ [x: number]: any
625
+ [x: symbol]: any
626
+ [x: `head-${string}`]: string
627
+ [x: `${string}-tail`]: string
628
+ [x: `head-${string}-tail`]: string
629
+ [x: `${bigint}`]: string
630
+ [x: `embedded-${number}`]: string
631
+
632
+ // These explicitly defined keys will remain.
633
+ foo: 'bar';
634
+ qux?: 'baz';
635
+ }
636
+
637
+ type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
638
+ // => { foo: 'bar'; qux?: 'baz' | undefined; }
639
+ ```
640
+
641
+ @see PickIndexSignature
642
+ @category Object
643
+ */
644
+ type OmitIndexSignature<ObjectType> = {
645
+ [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown>
646
+ ? never
647
+ : KeyType]: ObjectType[KeyType];
648
+ };
649
+
650
+ /**
651
+ Pick only index signatures from the given object type, leaving out all explicitly defined properties.
652
+
653
+ This is the counterpart of `OmitIndexSignature`.
654
+
655
+ @example
656
+ ```
657
+ import type {PickIndexSignature} from 'type-fest';
658
+
659
+ declare const symbolKey: unique symbol;
660
+
661
+ type Example = {
662
+ // These index signatures will remain.
663
+ [x: string]: unknown;
664
+ [x: number]: unknown;
665
+ [x: symbol]: unknown;
666
+ [x: `head-${string}`]: string;
667
+ [x: `${string}-tail`]: string;
668
+ [x: `head-${string}-tail`]: string;
669
+ [x: `${bigint}`]: string;
670
+ [x: `embedded-${number}`]: string;
671
+
672
+ // These explicitly defined keys will be removed.
673
+ ['kebab-case-key']: string;
674
+ [symbolKey]: string;
675
+ foo: 'bar';
676
+ qux?: 'baz';
677
+ };
678
+
679
+ type ExampleIndexSignature = PickIndexSignature<Example>;
680
+ // {
681
+ // [x: string]: unknown;
682
+ // [x: number]: unknown;
683
+ // [x: symbol]: unknown;
684
+ // [x: `head-${string}`]: string;
685
+ // [x: `${string}-tail`]: string;
686
+ // [x: `head-${string}-tail`]: string;
687
+ // [x: `${bigint}`]: string;
688
+ // [x: `embedded-${number}`]: string;
689
+ // }
690
+ ```
691
+
692
+ @see OmitIndexSignature
693
+ @category Object
694
+ */
695
+ type PickIndexSignature<ObjectType> = {
696
+ [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown>
697
+ ? KeyType
698
+ : never]: ObjectType[KeyType];
699
+ };
700
+
701
+ // Merges two objects without worrying about index signatures.
702
+ type SimpleMerge<Destination, Source> = {
703
+ [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key];
704
+ } & Source;
705
+
706
+ /**
707
+ Merge two types into a new type. Keys of the second type overrides keys of the first type.
708
+
709
+ @example
710
+ ```
711
+ import type {Merge} from 'type-fest';
712
+
713
+ interface Foo {
714
+ [x: string]: unknown;
715
+ [x: number]: unknown;
716
+ foo: string;
717
+ bar: symbol;
718
+ }
719
+
720
+ type Bar = {
721
+ [x: number]: number;
722
+ [x: symbol]: unknown;
723
+ bar: Date;
724
+ baz: boolean;
725
+ };
726
+
727
+ export type FooBar = Merge<Foo, Bar>;
728
+ // => {
729
+ // [x: string]: unknown;
730
+ // [x: number]: number;
731
+ // [x: symbol]: unknown;
732
+ // foo: string;
733
+ // bar: Date;
734
+ // baz: boolean;
735
+ // }
736
+ ```
737
+
738
+ @category Object
739
+ */
740
+ type Merge<Destination, Source> =
741
+ Simplify<
742
+ SimpleMerge<PickIndexSignature<Destination>, PickIndexSignature<Source>>
743
+ & SimpleMerge<OmitIndexSignature<Destination>, OmitIndexSignature<Source>>
744
+ >;
745
+
746
+ /**
747
+ An if-else-like type that resolves depending on whether the given type is `any`.
748
+
749
+ @see {@link IsAny}
750
+
751
+ @example
752
+ ```
753
+ import type {IfAny} from 'type-fest';
754
+
755
+ type ShouldBeTrue = IfAny<any>;
756
+ //=> true
757
+
758
+ type ShouldBeBar = IfAny<'not any', 'foo', 'bar'>;
759
+ //=> 'bar'
760
+ ```
761
+
762
+ @category Type Guard
763
+ @category Utilities
764
+ */
765
+ type IfAny<T, TypeIfAny = true, TypeIfNotAny = false> = (
766
+ IsAny<T> extends true ? TypeIfAny : TypeIfNotAny
767
+ );
768
+
769
+ /**
770
+ Merges user specified options with default options.
771
+
772
+ @example
773
+ ```
774
+ type PathsOptions = {maxRecursionDepth?: number; leavesOnly?: boolean};
775
+ type DefaultPathsOptions = {maxRecursionDepth: 10; leavesOnly: false};
776
+ type SpecifiedOptions = {leavesOnly: true};
777
+
778
+ type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOptions>;
779
+ //=> {maxRecursionDepth: 10; leavesOnly: true}
780
+ ```
781
+
782
+ @example
783
+ ```
784
+ // Complains if default values are not provided for optional options
785
+
786
+ type PathsOptions = {maxRecursionDepth?: number; leavesOnly?: boolean};
787
+ type DefaultPathsOptions = {maxRecursionDepth: 10};
788
+ type SpecifiedOptions = {};
789
+
790
+ type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOptions>;
791
+ // ~~~~~~~~~~~~~~~~~~~
792
+ // Property 'leavesOnly' is missing in type 'DefaultPathsOptions' but required in type '{ maxRecursionDepth: number; leavesOnly: boolean; }'.
793
+ ```
794
+
795
+ @example
796
+ ```
797
+ // Complains if an option's default type does not conform to the expected type
798
+
799
+ type PathsOptions = {maxRecursionDepth?: number; leavesOnly?: boolean};
800
+ type DefaultPathsOptions = {maxRecursionDepth: 10; leavesOnly: 'no'};
801
+ type SpecifiedOptions = {};
802
+
803
+ type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOptions>;
804
+ // ~~~~~~~~~~~~~~~~~~~
805
+ // Types of property 'leavesOnly' are incompatible. Type 'string' is not assignable to type 'boolean'.
806
+ ```
807
+
808
+ @example
809
+ ```
810
+ // Complains if an option's specified type does not conform to the expected type
811
+
812
+ type PathsOptions = {maxRecursionDepth?: number; leavesOnly?: boolean};
813
+ type DefaultPathsOptions = {maxRecursionDepth: 10; leavesOnly: false};
814
+ type SpecifiedOptions = {leavesOnly: 'yes'};
815
+
816
+ type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOptions>;
817
+ // ~~~~~~~~~~~~~~~~
818
+ // Types of property 'leavesOnly' are incompatible. Type 'string' is not assignable to type 'boolean'.
819
+ ```
820
+ */
821
+ type ApplyDefaultOptions<
822
+ Options extends object,
823
+ Defaults extends Simplify<Omit<Required<Options>, RequiredKeysOf<Options>> & Partial<Record<RequiredKeysOf<Options>, never>>>,
824
+ SpecifiedOptions extends Options,
825
+ > =
826
+ IfAny<SpecifiedOptions, Defaults,
827
+ IfNever<SpecifiedOptions, Defaults,
828
+ Simplify<Merge<Defaults, {
829
+ [Key in keyof SpecifiedOptions
830
+ as Key extends OptionalKeysOf<Options>
831
+ ? Extract<SpecifiedOptions[Key], undefined> extends never
832
+ ? Key
833
+ : never
834
+ : Key
835
+ ]: SpecifiedOptions[Key]
836
+ }> & Required<Options>> // `& Required<Options>` ensures that `ApplyDefaultOptions<SomeOption, ...>` is always assignable to `Required<SomeOption>`
837
+ >>;
838
+
839
+ /**
840
+ Filter out keys from an object.
841
+
842
+ Returns `never` if `Exclude` is strictly equal to `Key`.
843
+ Returns `never` if `Key` extends `Exclude`.
844
+ Returns `Key` otherwise.
845
+
846
+ @example
847
+ ```
848
+ type Filtered = Filter<'foo', 'foo'>;
849
+ //=> never
850
+ ```
851
+
852
+ @example
853
+ ```
854
+ type Filtered = Filter<'bar', string>;
855
+ //=> never
856
+ ```
857
+
858
+ @example
859
+ ```
860
+ type Filtered = Filter<'bar', 'foo'>;
861
+ //=> 'bar'
862
+ ```
863
+
864
+ @see {Except}
865
+ */
866
+ type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
867
+
868
+ type ExceptOptions = {
869
+ /**
870
+ Disallow assigning non-specified properties.
871
+
872
+ Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
873
+
874
+ @default false
875
+ */
876
+ requireExactProps?: boolean;
877
+ };
878
+
879
+ type DefaultExceptOptions = {
880
+ requireExactProps: false;
881
+ };
882
+
883
+ /**
884
+ Create a type from an object type without certain keys.
885
+
886
+ We recommend setting the `requireExactProps` option to `true`.
887
+
888
+ This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically.
889
+
890
+ This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)).
891
+
892
+ @example
893
+ ```
894
+ import type {Except} from 'type-fest';
895
+
896
+ type Foo = {
897
+ a: number;
898
+ b: string;
899
+ };
900
+
901
+ type FooWithoutA = Except<Foo, 'a'>;
902
+ //=> {b: string}
903
+
904
+ const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
905
+ //=> errors: 'a' does not exist in type '{ b: string; }'
906
+
907
+ type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
908
+ //=> {a: number} & Partial<Record<"b", never>>
909
+
910
+ const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
911
+ //=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
912
+
913
+ // The `Omit` utility type doesn't work when omitting specific keys from objects containing index signatures.
914
+
915
+ // Consider the following example:
916
+
917
+ type UserData = {
918
+ [metadata: string]: string;
919
+ email: string;
920
+ name: string;
921
+ role: 'admin' | 'user';
922
+ };
923
+
924
+ // `Omit` clearly doesn't behave as expected in this case:
925
+ type PostPayload = Omit<UserData, 'email'>;
926
+ //=> type PostPayload = { [x: string]: string; [x: number]: string; }
927
+
928
+ // In situations like this, `Except` works better.
929
+ // It simply removes the `email` key while preserving all the other keys.
930
+ type PostPayload = Except<UserData, 'email'>;
931
+ //=> type PostPayload = { [x: string]: string; name: string; role: 'admin' | 'user'; }
932
+ ```
933
+
934
+ @category Object
935
+ */
936
+ type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {}> =
937
+ _Except<ObjectType, KeysType, ApplyDefaultOptions<ExceptOptions, DefaultExceptOptions, Options>>;
938
+
939
+ type _Except<ObjectType, KeysType extends keyof ObjectType, Options extends Required<ExceptOptions>> = {
940
+ [KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
941
+ } & (Options['requireExactProps'] extends true
942
+ ? Partial<Record<KeysType, never>>
943
+ : {});
944
+
945
+ declare namespace TsConfigJson {
946
+ namespace CompilerOptions {
947
+ export type JSX =
948
+ | 'preserve'
949
+ | 'react'
950
+ | 'react-jsx'
951
+ | 'react-jsxdev'
952
+ | 'react-native';
953
+
954
+ export type Module =
955
+ | 'CommonJS'
956
+ | 'AMD'
957
+ | 'System'
958
+ | 'UMD'
959
+ | 'ES6'
960
+ | 'ES2015'
961
+ | 'ES2020'
962
+ | 'ES2022'
963
+ | 'ESNext'
964
+ | 'Node16'
965
+ | 'Node18'
966
+ | 'NodeNext'
967
+ | 'Preserve'
968
+ | 'None'
969
+ // Lowercase alternatives
970
+ | 'commonjs'
971
+ | 'amd'
972
+ | 'system'
973
+ | 'umd'
974
+ | 'es6'
975
+ | 'es2015'
976
+ | 'es2020'
977
+ | 'es2022'
978
+ | 'esnext'
979
+ | 'node16'
980
+ | 'node18'
981
+ | 'nodenext'
982
+ | 'preserve'
983
+ | 'none';
984
+
985
+ export type NewLine =
986
+ | 'CRLF'
987
+ | 'LF'
988
+ // Lowercase alternatives
989
+ | 'crlf'
990
+ | 'lf';
991
+
992
+ export type Target =
993
+ | 'ES3'
994
+ | 'ES5'
995
+ | 'ES6'
996
+ | 'ES2015'
997
+ | 'ES2016'
998
+ | 'ES2017'
999
+ | 'ES2018'
1000
+ | 'ES2019'
1001
+ | 'ES2020'
1002
+ | 'ES2021'
1003
+ | 'ES2022'
1004
+ | 'ES2023'
1005
+ | 'ES2024'
1006
+ | 'ESNext'
1007
+ // Lowercase alternatives
1008
+ | 'es3'
1009
+ | 'es5'
1010
+ | 'es6'
1011
+ | 'es2015'
1012
+ | 'es2016'
1013
+ | 'es2017'
1014
+ | 'es2018'
1015
+ | 'es2019'
1016
+ | 'es2020'
1017
+ | 'es2021'
1018
+ | 'es2022'
1019
+ | 'es2023'
1020
+ | 'es2024'
1021
+ | 'esnext';
1022
+
1023
+ // eslint-disable-next-line unicorn/prevent-abbreviations
1024
+ export type Lib =
1025
+ | 'ES5'
1026
+ | 'ES6'
1027
+ | 'ES7'
1028
+ | 'ES2015'
1029
+ | 'ES2015.Collection'
1030
+ | 'ES2015.Core'
1031
+ | 'ES2015.Generator'
1032
+ | 'ES2015.Iterable'
1033
+ | 'ES2015.Promise'
1034
+ | 'ES2015.Proxy'
1035
+ | 'ES2015.Reflect'
1036
+ | 'ES2015.Symbol.WellKnown'
1037
+ | 'ES2015.Symbol'
1038
+ | 'ES2016'
1039
+ | 'ES2016.Array.Include'
1040
+ | 'ES2017'
1041
+ | 'ES2017.ArrayBuffer'
1042
+ | 'ES2017.Date'
1043
+ | 'ES2017.Intl'
1044
+ | 'ES2017.Object'
1045
+ | 'ES2017.SharedMemory'
1046
+ | 'ES2017.String'
1047
+ | 'ES2017.TypedArrays'
1048
+ | 'ES2018'
1049
+ | 'ES2018.AsyncGenerator'
1050
+ | 'ES2018.AsyncIterable'
1051
+ | 'ES2018.Intl'
1052
+ | 'ES2018.Promise'
1053
+ | 'ES2018.Regexp'
1054
+ | 'ES2019'
1055
+ | 'ES2019.Array'
1056
+ | 'ES2019.Object'
1057
+ | 'ES2019.String'
1058
+ | 'ES2019.Symbol'
1059
+ | 'ES2020'
1060
+ | 'ES2020.BigInt'
1061
+ | 'ES2020.Promise'
1062
+ | 'ES2020.String'
1063
+ | 'ES2020.Symbol.WellKnown'
1064
+ | 'ES2020.SharedMemory'
1065
+ | 'ES2020.Intl'
1066
+ | 'ES2021'
1067
+ | 'ES2021.Intl'
1068
+ | 'ES2021.Promise'
1069
+ | 'ES2021.String'
1070
+ | 'ES2021.WeakRef'
1071
+ | 'ES2022'
1072
+ | 'ES2022.Array'
1073
+ | 'ES2022.Error'
1074
+ | 'ES2022.Intl'
1075
+ | 'ES2022.Object'
1076
+ | 'ES2022.RegExp'
1077
+ | 'ES2022.String'
1078
+ | 'ES2023'
1079
+ | 'ES2023.Array'
1080
+ | 'ES2023.Collection'
1081
+ | 'ES2023.Intl'
1082
+ | 'ES2024'
1083
+ | 'ES2024.ArrayBuffer'
1084
+ | 'ES2024.Collection'
1085
+ | 'ES2024.Object'
1086
+ | 'ES2024.Promise'
1087
+ | 'ES2024.Regexp'
1088
+ | 'ES2024.SharedMemory'
1089
+ | 'ES2024.String'
1090
+ | 'ESNext'
1091
+ | 'ESNext.Array'
1092
+ | 'ESNext.AsyncIterable'
1093
+ | 'ESNext.BigInt'
1094
+ | 'ESNext.Collection'
1095
+ | 'ESNext.Decorators'
1096
+ | 'ESNext.Disposable'
1097
+ | 'ESNext.Intl'
1098
+ | 'ESNext.Iterator'
1099
+ | 'ESNext.Promise'
1100
+ | 'ESNext.String'
1101
+ | 'ESNext.Symbol'
1102
+ | 'ESNext.WeakRef'
1103
+ | 'DOM'
1104
+ | 'DOM.Iterable'
1105
+ | 'ScriptHost'
1106
+ | 'WebWorker'
1107
+ | 'WebWorker.AsyncIterable'
1108
+ | 'WebWorker.ImportScripts'
1109
+ | 'WebWorker.Iterable'
1110
+ // Lowercase alternatives
1111
+ | 'es5'
1112
+ | 'es6'
1113
+ | 'es7'
1114
+ | 'es2015'
1115
+ | 'es2015.collection'
1116
+ | 'es2015.core'
1117
+ | 'es2015.generator'
1118
+ | 'es2015.iterable'
1119
+ | 'es2015.promise'
1120
+ | 'es2015.proxy'
1121
+ | 'es2015.reflect'
1122
+ | 'es2015.symbol.wellknown'
1123
+ | 'es2015.symbol'
1124
+ | 'es2016'
1125
+ | 'es2016.array.include'
1126
+ | 'es2017'
1127
+ | 'es2017.arraybuffer'
1128
+ | 'es2017.date'
1129
+ | 'es2017.intl'
1130
+ | 'es2017.object'
1131
+ | 'es2017.sharedmemory'
1132
+ | 'es2017.string'
1133
+ | 'es2017.typedarrays'
1134
+ | 'es2018'
1135
+ | 'es2018.asyncgenerator'
1136
+ | 'es2018.asynciterable'
1137
+ | 'es2018.intl'
1138
+ | 'es2018.promise'
1139
+ | 'es2018.regexp'
1140
+ | 'es2019'
1141
+ | 'es2019.array'
1142
+ | 'es2019.object'
1143
+ | 'es2019.string'
1144
+ | 'es2019.symbol'
1145
+ | 'es2020'
1146
+ | 'es2020.bigint'
1147
+ | 'es2020.promise'
1148
+ | 'es2020.string'
1149
+ | 'es2020.symbol.wellknown'
1150
+ | 'es2020.sharedmemory'
1151
+ | 'es2020.intl'
1152
+ | 'es2021'
1153
+ | 'es2021.intl'
1154
+ | 'es2021.promise'
1155
+ | 'es2021.string'
1156
+ | 'es2021.weakref'
1157
+ | 'es2022'
1158
+ | 'es2022.array'
1159
+ | 'es2022.error'
1160
+ | 'es2022.intl'
1161
+ | 'es2022.object'
1162
+ | 'es2022.regexp'
1163
+ | 'es2022.string'
1164
+ | 'es2023'
1165
+ | 'es2023.array'
1166
+ | 'es2023.collection'
1167
+ | 'es2023.intl'
1168
+ | 'es2024'
1169
+ | 'es2024.arraybuffer'
1170
+ | 'es2024.collection'
1171
+ | 'es2024.object'
1172
+ | 'es2024.promise'
1173
+ | 'es2024.regexp'
1174
+ | 'es2024.sharedmemory'
1175
+ | 'es2024.string'
1176
+ | 'esnext'
1177
+ | 'esnext.array'
1178
+ | 'esnext.asynciterable'
1179
+ | 'esnext.bigint'
1180
+ | 'esnext.collection'
1181
+ | 'esnext.decorators'
1182
+ | 'esnext.disposable'
1183
+ | 'esnext.intl'
1184
+ | 'esnext.iterator'
1185
+ | 'esnext.promise'
1186
+ | 'esnext.string'
1187
+ | 'esnext.symbol'
1188
+ | 'esnext.weakref'
1189
+ | 'dom'
1190
+ | 'dom.iterable'
1191
+ | 'scripthost'
1192
+ | 'webworker'
1193
+ | 'webworker.asynciterable'
1194
+ | 'webworker.importscripts'
1195
+ | 'webworker.iterable';
1196
+
1197
+ export type Plugin = {
1198
+ /**
1199
+ Plugin name.
1200
+ */
1201
+ name: string;
1202
+ };
1203
+
1204
+ export type ImportsNotUsedAsValues =
1205
+ | 'remove'
1206
+ | 'preserve'
1207
+ | 'error';
1208
+
1209
+ export type FallbackPolling =
1210
+ | 'fixedPollingInterval'
1211
+ | 'priorityPollingInterval'
1212
+ | 'dynamicPriorityPolling'
1213
+ | 'fixedInterval'
1214
+ | 'priorityInterval'
1215
+ | 'dynamicPriority'
1216
+ | 'fixedChunkSize';
1217
+
1218
+ export type WatchDirectory =
1219
+ | 'useFsEvents'
1220
+ | 'fixedPollingInterval'
1221
+ | 'dynamicPriorityPolling'
1222
+ | 'fixedChunkSizePolling';
1223
+
1224
+ export type WatchFile =
1225
+ | 'fixedPollingInterval'
1226
+ | 'priorityPollingInterval'
1227
+ | 'dynamicPriorityPolling'
1228
+ | 'useFsEvents'
1229
+ | 'useFsEventsOnParentDirectory'
1230
+ | 'fixedChunkSizePolling';
1231
+
1232
+ export type ModuleResolution =
1233
+ | 'classic'
1234
+ | 'node'
1235
+ | 'node10'
1236
+ | 'node16'
1237
+ | 'nodenext'
1238
+ | 'bundler'
1239
+ // Pascal-cased alternatives
1240
+ | 'Classic'
1241
+ | 'Node'
1242
+ | 'Node10'
1243
+ | 'Node16'
1244
+ | 'NodeNext'
1245
+ | 'Bundler';
1246
+
1247
+ export type ModuleDetection =
1248
+ | 'auto'
1249
+ | 'legacy'
1250
+ | 'force';
1251
+
1252
+ export type IgnoreDeprecations = '5.0';
1253
+ }
1254
+
1255
+ export type CompilerOptions = {
1256
+ /**
1257
+ The character set of the input files.
1258
+
1259
+ @default 'utf8'
1260
+ @deprecated This option will be removed in TypeScript 5.5.
1261
+ */
1262
+ charset?: string;
1263
+
1264
+ /**
1265
+ Enables building for project references.
1266
+
1267
+ @default true
1268
+ */
1269
+ composite?: boolean;
1270
+
1271
+ /**
1272
+ Generates corresponding d.ts files.
1273
+
1274
+ @default false
1275
+ */
1276
+ declaration?: boolean;
1277
+
1278
+ /**
1279
+ Specify output directory for generated declaration files.
1280
+ */
1281
+ declarationDir?: string;
1282
+
1283
+ /**
1284
+ Show diagnostic information.
1285
+
1286
+ @default false
1287
+ */
1288
+ diagnostics?: boolean;
1289
+
1290
+ /**
1291
+ Reduce the number of projects loaded automatically by TypeScript.
1292
+
1293
+ @default false
1294
+ */
1295
+ disableReferencedProjectLoad?: boolean;
1296
+
1297
+ /**
1298
+ Enforces using indexed accessors for keys declared using an indexed type.
1299
+
1300
+ @default false
1301
+ */
1302
+ noPropertyAccessFromIndexSignature?: boolean;
1303
+
1304
+ /**
1305
+ Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.
1306
+
1307
+ @default false
1308
+ */
1309
+ emitBOM?: boolean;
1310
+
1311
+ /**
1312
+ Only emit `.d.ts` declaration files.
1313
+
1314
+ @default false
1315
+ */
1316
+ emitDeclarationOnly?: boolean;
1317
+
1318
+ /**
1319
+ Differentiate between undefined and not present when type checking.
1320
+
1321
+ @default false
1322
+ */
1323
+ exactOptionalPropertyTypes?: boolean;
1324
+
1325
+ /**
1326
+ Enable incremental compilation.
1327
+
1328
+ @default `composite`
1329
+ */
1330
+ incremental?: boolean;
1331
+
1332
+ /**
1333
+ Specify file to store incremental compilation information.
1334
+
1335
+ @default '.tsbuildinfo'
1336
+ */
1337
+ tsBuildInfoFile?: string;
1338
+
1339
+ /**
1340
+ Emit a single file with source maps instead of having a separate file.
1341
+
1342
+ @default false
1343
+ */
1344
+ inlineSourceMap?: boolean;
1345
+
1346
+ /**
1347
+ Emit the source alongside the sourcemaps within a single file.
1348
+
1349
+ Requires `--inlineSourceMap` to be set.
1350
+
1351
+ @default false
1352
+ */
1353
+ inlineSources?: boolean;
1354
+
1355
+ /**
1356
+ Specify what JSX code is generated.
1357
+
1358
+ @default 'preserve'
1359
+ */
1360
+ jsx?: CompilerOptions.JSX;
1361
+
1362
+ /**
1363
+ Specifies the object invoked for `createElement` and `__spread` when targeting `'react'` JSX emit.
1364
+
1365
+ @default 'React'
1366
+ */
1367
+ reactNamespace?: string;
1368
+
1369
+ /**
1370
+ Specify the JSX factory function to use when targeting React JSX emit, e.g. `React.createElement` or `h`.
1371
+
1372
+ @default 'React.createElement'
1373
+ */
1374
+ jsxFactory?: string;
1375
+
1376
+ /**
1377
+ Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.
1378
+
1379
+ @default 'React.Fragment'
1380
+ */
1381
+ jsxFragmentFactory?: string;
1382
+
1383
+ /**
1384
+ Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.
1385
+
1386
+ @default 'react'
1387
+ */
1388
+ jsxImportSource?: string;
1389
+
1390
+ /**
1391
+ Print names of files part of the compilation.
1392
+
1393
+ @default false
1394
+ */
1395
+ listFiles?: boolean;
1396
+
1397
+ /**
1398
+ Specifies the location where debugger should locate map files instead of generated locations.
1399
+ */
1400
+ mapRoot?: string;
1401
+
1402
+ /**
1403
+ 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.
1404
+
1405
+ @default ['ES3', 'ES5'].includes(target) ? 'CommonJS' : 'ES6'
1406
+ */
1407
+ module?: CompilerOptions.Module;
1408
+
1409
+ /**
1410
+ Specifies module resolution strategy: 'node' (Node) or 'classic' (TypeScript pre 1.6).
1411
+
1412
+ @default ['AMD', 'System', 'ES6'].includes(module) ? 'classic' : 'node'
1413
+ */
1414
+ moduleResolution?: CompilerOptions.ModuleResolution;
1415
+
1416
+ /**
1417
+ Specifies the end of line sequence to be used when emitting files: 'crlf' (Windows) or 'lf' (Unix).
1418
+
1419
+ @default 'LF'
1420
+ */
1421
+ newLine?: CompilerOptions.NewLine;
1422
+
1423
+ /**
1424
+ Disable full type checking (only critical parse and emit errors will be reported).
1425
+
1426
+ @default false
1427
+ */
1428
+ noCheck?: boolean;
1429
+
1430
+ /**
1431
+ Do not emit output.
1432
+
1433
+ @default false
1434
+ */
1435
+ noEmit?: boolean;
1436
+
1437
+ /**
1438
+ Do not generate custom helper functions like `__extends` in compiled output.
1439
+
1440
+ @default false
1441
+ */
1442
+ noEmitHelpers?: boolean;
1443
+
1444
+ /**
1445
+ Do not emit outputs if any type checking errors were reported.
1446
+
1447
+ @default false
1448
+ */
1449
+ noEmitOnError?: boolean;
1450
+
1451
+ /**
1452
+ Warn on expressions and declarations with an implied 'any' type.
1453
+
1454
+ @default false
1455
+ */
1456
+ noImplicitAny?: boolean;
1457
+
1458
+ /**
1459
+ Raise error on 'this' expressions with an implied any type.
1460
+
1461
+ @default false
1462
+ */
1463
+ noImplicitThis?: boolean;
1464
+
1465
+ /**
1466
+ Report errors on unused locals.
1467
+
1468
+ @default false
1469
+ */
1470
+ noUnusedLocals?: boolean;
1471
+
1472
+ /**
1473
+ Report errors on unused parameters.
1474
+
1475
+ @default false
1476
+ */
1477
+ noUnusedParameters?: boolean;
1478
+
1479
+ /**
1480
+ Do not include the default library file (lib.d.ts).
1481
+
1482
+ @default false
1483
+ */
1484
+ noLib?: boolean;
1485
+
1486
+ /**
1487
+ Do not add triple-slash references or module import targets to the list of compiled files.
1488
+
1489
+ @default false
1490
+ */
1491
+ noResolve?: boolean;
1492
+
1493
+ /**
1494
+ Disable strict checking of generic signatures in function types.
1495
+
1496
+ @default false
1497
+ @deprecated This option will be removed in TypeScript 5.5.
1498
+ */
1499
+ noStrictGenericChecks?: boolean;
1500
+
1501
+ /**
1502
+ @deprecated use `skipLibCheck` instead.
1503
+ */
1504
+ skipDefaultLibCheck?: boolean;
1505
+
1506
+ /**
1507
+ Skip type checking of declaration files.
1508
+
1509
+ @default false
1510
+ */
1511
+ skipLibCheck?: boolean;
1512
+
1513
+ /**
1514
+ Concatenate and emit output to single file.
1515
+ */
1516
+ outFile?: string;
1517
+
1518
+ /**
1519
+ Redirect output structure to the directory.
1520
+ */
1521
+ outDir?: string;
1522
+
1523
+ /**
1524
+ Do not erase const enum declarations in generated code.
1525
+
1526
+ @default false
1527
+ */
1528
+ preserveConstEnums?: boolean;
1529
+
1530
+ /**
1531
+ Do not resolve symlinks to their real path; treat a symlinked file like a real one.
1532
+
1533
+ @default false
1534
+ */
1535
+ preserveSymlinks?: boolean;
1536
+
1537
+ /**
1538
+ Keep outdated console output in watch mode instead of clearing the screen.
1539
+
1540
+ @default false
1541
+ */
1542
+ preserveWatchOutput?: boolean;
1543
+
1544
+ /**
1545
+ Stylize errors and messages using color and context (experimental).
1546
+
1547
+ @default true // Unless piping to another program or redirecting output to a file.
1548
+ */
1549
+ pretty?: boolean;
1550
+
1551
+ /**
1552
+ Do not emit comments to output.
1553
+
1554
+ @default false
1555
+ */
1556
+ removeComments?: boolean;
1557
+
1558
+ /**
1559
+ Specifies the root directory of input files.
1560
+
1561
+ Use to control the output directory structure with `--outDir`.
1562
+ */
1563
+ rootDir?: string;
1564
+
1565
+ /**
1566
+ Unconditionally emit imports for unresolved files.
1567
+
1568
+ @default false
1569
+ */
1570
+ isolatedModules?: boolean;
1571
+
1572
+ /**
1573
+ Require sufficient annotation on exports so other tools can trivially generate declaration files.
1574
+
1575
+ @default false
1576
+ */
1577
+ isolatedDeclarations?: boolean;
1578
+
1579
+ /**
1580
+ Generates corresponding '.map' file.
1581
+
1582
+ @default false
1583
+ */
1584
+ sourceMap?: boolean;
1585
+
1586
+ /**
1587
+ Specifies the location where debugger should locate TypeScript files instead of source locations.
1588
+ */
1589
+ sourceRoot?: string;
1590
+
1591
+ /**
1592
+ Suppress excess property checks for object literals.
1593
+
1594
+ @default false
1595
+ @deprecated This option will be removed in TypeScript 5.5.
1596
+ */
1597
+ suppressExcessPropertyErrors?: boolean;
1598
+
1599
+ /**
1600
+ Suppress noImplicitAny errors for indexing objects lacking index signatures.
1601
+
1602
+ @default false
1603
+ @deprecated This option will be removed in TypeScript 5.5.
1604
+ */
1605
+ suppressImplicitAnyIndexErrors?: boolean;
1606
+
1607
+
1608
+
1609
+ /**
1610
+ Specify ECMAScript target version.
1611
+
1612
+ @default 'es3'
1613
+ */
1614
+ target?: CompilerOptions.Target;
1615
+
1616
+ /**
1617
+ Default catch clause variables as `unknown` instead of `any`.
1618
+
1619
+ @default false
1620
+ */
1621
+ useUnknownInCatchVariables?: boolean;
1622
+
1623
+ /**
1624
+ Watch input files.
1625
+
1626
+ @default false
1627
+ @deprecated Use watchOptions instead.
1628
+ */
1629
+ watch?: boolean;
1630
+
1631
+ /**
1632
+ Specify the polling strategy to use when the system runs out of or doesn't support native file watchers.
1633
+
1634
+ @deprecated Use watchOptions.fallbackPolling instead.
1635
+ */
1636
+ fallbackPolling?: CompilerOptions.FallbackPolling;
1637
+
1638
+ /**
1639
+ Specify the strategy for watching directories under systems that lack recursive file-watching functionality.
1640
+
1641
+ @default 'useFsEvents'
1642
+ @deprecated Use watchOptions.watchDirectory instead.
1643
+ */
1644
+ watchDirectory?: CompilerOptions.WatchDirectory;
1645
+
1646
+ /**
1647
+ Specify the strategy for watching individual files.
1648
+
1649
+ @default 'useFsEvents'
1650
+ @deprecated Use watchOptions.watchFile instead.
1651
+ */
1652
+ watchFile?: CompilerOptions.WatchFile;
1653
+
1654
+ /**
1655
+ Enables experimental support for ES7 decorators.
1656
+
1657
+ @default false
1658
+ */
1659
+ experimentalDecorators?: boolean;
1660
+
1661
+ /**
1662
+ Emit design-type metadata for decorated declarations in source.
1663
+
1664
+ @default false
1665
+ */
1666
+ emitDecoratorMetadata?: boolean;
1667
+
1668
+ /**
1669
+ Do not report errors on unused labels.
1670
+
1671
+ @default false
1672
+ */
1673
+ allowUnusedLabels?: boolean;
1674
+
1675
+ /**
1676
+ Report error when not all code paths in function return a value.
1677
+
1678
+ @default false
1679
+ */
1680
+ noImplicitReturns?: boolean;
1681
+
1682
+ /**
1683
+ Add `undefined` to a type when accessed using an index.
1684
+
1685
+ @default false
1686
+ */
1687
+ noUncheckedIndexedAccess?: boolean;
1688
+
1689
+ /**
1690
+ Report error if failed to find a source file for a side effect import.
1691
+
1692
+ @default false
1693
+ */
1694
+ noUncheckedSideEffectImports?: boolean;
1695
+
1696
+ /**
1697
+ Report errors for fallthrough cases in switch statement.
1698
+
1699
+ @default false
1700
+ */
1701
+ noFallthroughCasesInSwitch?: boolean;
1702
+
1703
+ /**
1704
+ Ensure overriding members in derived classes are marked with an override modifier.
1705
+
1706
+ @default false
1707
+ */
1708
+ noImplicitOverride?: boolean;
1709
+
1710
+ /**
1711
+ Do not report errors on unreachable code.
1712
+
1713
+ @default false
1714
+ */
1715
+ allowUnreachableCode?: boolean;
1716
+
1717
+ /**
1718
+ Disallow inconsistently-cased references to the same file.
1719
+
1720
+ @default true
1721
+ */
1722
+ forceConsistentCasingInFileNames?: boolean;
1723
+
1724
+ /**
1725
+ Emit a v8 CPU profile of the compiler run for debugging.
1726
+
1727
+ @default 'profile.cpuprofile'
1728
+ */
1729
+ generateCpuProfile?: string;
1730
+
1731
+ /**
1732
+ Generates an event trace and a list of types.
1733
+ */
1734
+ generateTrace?: boolean;
1735
+
1736
+ /**
1737
+ Base directory to resolve non-relative module names.
1738
+ */
1739
+ baseUrl?: string;
1740
+
1741
+ /**
1742
+ Specify path mapping to be computed relative to baseUrl option.
1743
+ */
1744
+ paths?: Record<string, string[]>;
1745
+
1746
+ /**
1747
+ List of TypeScript language server plugins to load.
1748
+ */
1749
+ plugins?: CompilerOptions.Plugin[];
1750
+
1751
+ /**
1752
+ Specify list of root directories to be used when resolving modules.
1753
+ */
1754
+ rootDirs?: string[];
1755
+
1756
+ /**
1757
+ Specify list of directories for type definition files to be included.
1758
+ */
1759
+ typeRoots?: string[];
1760
+
1761
+ /**
1762
+ Type declaration files to be included in compilation.
1763
+ */
1764
+ types?: string[];
1765
+
1766
+ /**
1767
+ Enable tracing of the name resolution process.
1768
+
1769
+ @default false
1770
+ */
1771
+ traceResolution?: boolean;
1772
+
1773
+ /**
1774
+ Allow javascript files to be compiled.
1775
+
1776
+ @default false
1777
+ */
1778
+ allowJs?: boolean;
1779
+
1780
+ /**
1781
+ Do not truncate error messages.
1782
+
1783
+ @default false
1784
+ */
1785
+ noErrorTruncation?: boolean;
1786
+
1787
+ /**
1788
+ Allow default imports from modules with no default export. This does not affect code emit, just typechecking.
1789
+
1790
+ @default module === 'system' || esModuleInterop
1791
+ */
1792
+ allowSyntheticDefaultImports?: boolean;
1793
+
1794
+ /**
1795
+ Do not emit `'use strict'` directives in module output.
1796
+
1797
+ @default false
1798
+ @deprecated This option will be removed in TypeScript 5.5.
1799
+ */
1800
+ noImplicitUseStrict?: boolean;
1801
+
1802
+ /**
1803
+ Enable to list all emitted files.
1804
+
1805
+ @default false
1806
+ */
1807
+ listEmittedFiles?: boolean;
1808
+
1809
+ /**
1810
+ Disable size limit for JavaScript project.
1811
+
1812
+ @default false
1813
+ */
1814
+ disableSizeLimit?: boolean;
1815
+
1816
+ /**
1817
+ List of library files to be included in the compilation.
1818
+ */
1819
+ lib?: CompilerOptions.Lib[];
1820
+
1821
+ /**
1822
+ Enable strict null checks.
1823
+
1824
+ @default false
1825
+ */
1826
+ strictNullChecks?: boolean;
1827
+
1828
+ /**
1829
+ The maximum dependency depth to search under `node_modules` and load JavaScript files. Only applicable with `--allowJs`.
1830
+
1831
+ @default 0
1832
+ */
1833
+ maxNodeModuleJsDepth?: number;
1834
+
1835
+ /**
1836
+ Import emit helpers (e.g. `__extends`, `__rest`, etc..) from tslib.
1837
+
1838
+ @default false
1839
+ */
1840
+ importHelpers?: boolean;
1841
+
1842
+ /**
1843
+ Specify emit/checking behavior for imports that are only used for types.
1844
+
1845
+ @default 'remove'
1846
+ @deprecated Use `verbatimModuleSyntax` instead.
1847
+ */
1848
+ importsNotUsedAsValues?: CompilerOptions.ImportsNotUsedAsValues;
1849
+
1850
+ /**
1851
+ Parse in strict mode and emit `'use strict'` for each source file.
1852
+
1853
+ @default false
1854
+ */
1855
+ alwaysStrict?: boolean;
1856
+
1857
+ /**
1858
+ Enable all strict type checking options.
1859
+
1860
+ @default false
1861
+ */
1862
+ strict?: boolean;
1863
+
1864
+ /**
1865
+ Enable stricter checking of of the `bind`, `call`, and `apply` methods on functions.
1866
+
1867
+ @default false
1868
+ */
1869
+ strictBindCallApply?: boolean;
1870
+
1871
+ /**
1872
+ Provide full support for iterables in `for-of`, spread, and destructuring when targeting `ES5` or `ES3`.
1873
+
1874
+ @default false
1875
+ */
1876
+ downlevelIteration?: boolean;
1877
+
1878
+ /**
1879
+ Report errors in `.js` files.
1880
+
1881
+ @default false
1882
+ */
1883
+ checkJs?: boolean;
1884
+
1885
+ /**
1886
+ Built-in iterators are instantiated with a `TReturn` type of undefined instead of `any`.
1887
+
1888
+ @default false
1889
+ */
1890
+ strictBuiltinIteratorReturn?: boolean;
1891
+
1892
+ /**
1893
+ Disable bivariant parameter checking for function types.
1894
+
1895
+ @default false
1896
+ */
1897
+ strictFunctionTypes?: boolean;
1898
+
1899
+ /**
1900
+ Ensure non-undefined class properties are initialized in the constructor.
1901
+
1902
+ @default false
1903
+ */
1904
+ strictPropertyInitialization?: boolean;
1905
+
1906
+ /**
1907
+ Emit `__importStar` and `__importDefault` helpers for runtime Babel ecosystem compatibility and enable `--allowSyntheticDefaultImports` for typesystem compatibility.
1908
+
1909
+ @default false
1910
+ */
1911
+ esModuleInterop?: boolean;
1912
+
1913
+ /**
1914
+ Allow accessing UMD globals from modules.
1915
+
1916
+ @default false
1917
+ */
1918
+ allowUmdGlobalAccess?: boolean;
1919
+
1920
+ /**
1921
+ Resolve `keyof` to string valued property names only (no numbers or symbols).
1922
+
1923
+ @default false
1924
+ @deprecated This option will be removed in TypeScript 5.5.
1925
+ */
1926
+ keyofStringsOnly?: boolean;
1927
+
1928
+ /**
1929
+ Emit ECMAScript standard class fields.
1930
+
1931
+ @default false
1932
+ */
1933
+ useDefineForClassFields?: boolean;
1934
+
1935
+ /**
1936
+ Generates a sourcemap for each corresponding `.d.ts` file.
1937
+
1938
+ @default false
1939
+ */
1940
+ declarationMap?: boolean;
1941
+
1942
+ /**
1943
+ Include modules imported with `.json` extension.
1944
+
1945
+ @default false
1946
+ */
1947
+ resolveJsonModule?: boolean;
1948
+
1949
+ /**
1950
+ Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it.
1951
+
1952
+ @default false
1953
+ */
1954
+ assumeChangesOnlyAffectDirectDependencies?: boolean;
1955
+
1956
+ /**
1957
+ Output more detailed compiler performance information after building.
1958
+
1959
+ @default false
1960
+ */
1961
+ extendedDiagnostics?: boolean;
1962
+
1963
+ /**
1964
+ Print names of files that are part of the compilation and then stop processing.
1965
+
1966
+ @default false
1967
+ */
1968
+ listFilesOnly?: boolean;
1969
+
1970
+ /**
1971
+ Disable preferring source files instead of declaration files when referencing composite projects.
1972
+
1973
+ @default true if composite, false otherwise
1974
+ */
1975
+ disableSourceOfProjectReferenceRedirect?: boolean;
1976
+
1977
+ /**
1978
+ Opt a project out of multi-project reference checking when editing.
1979
+
1980
+ @default false
1981
+ */
1982
+ disableSolutionSearching?: boolean;
1983
+
1984
+ /**
1985
+ Print names of files which TypeScript sees as a part of your project and the reason they are part of the compilation.
1986
+
1987
+ @default false
1988
+ */
1989
+ explainFiles?: boolean;
1990
+
1991
+ /**
1992
+ Preserve unused imported values in the JavaScript output that would otherwise be removed.
1993
+
1994
+ @default true
1995
+ @deprecated Use `verbatimModuleSyntax` instead.
1996
+ */
1997
+ preserveValueImports?: boolean;
1998
+
1999
+ /**
2000
+ List of file name suffixes to search when resolving a module.
2001
+ */
2002
+ moduleSuffixes?: string[];
2003
+
2004
+ /**
2005
+ Control what method is used to detect module-format JS files.
2006
+
2007
+ @default 'auto'
2008
+ */
2009
+ moduleDetection?: CompilerOptions.ModuleDetection;
2010
+
2011
+ /**
2012
+ Allows TypeScript files to import each other with a TypeScript-specific extension like .ts, .mts, or .tsx.
2013
+
2014
+ @default false
2015
+ */
2016
+ allowImportingTsExtensions?: boolean;
2017
+
2018
+ /**
2019
+ Forces TypeScript to consult the exports field of package.json files if it ever reads from a package in node_modules.
2020
+
2021
+ @default false
2022
+ */
2023
+ resolvePackageJsonExports?: boolean;
2024
+
2025
+ /**
2026
+ 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.
2027
+
2028
+ @default false
2029
+ */
2030
+ resolvePackageJsonImports?: boolean;
2031
+
2032
+ /**
2033
+ Suppress errors for file formats that TypeScript does not understand.
2034
+
2035
+ @default false
2036
+ */
2037
+ allowArbitraryExtensions?: boolean;
2038
+
2039
+ /**
2040
+ List of additional conditions that should succeed when TypeScript resolves from package.json.
2041
+ */
2042
+ customConditions?: string[];
2043
+
2044
+ /**
2045
+ Anything that uses the type modifier is dropped entirely.
2046
+
2047
+ @default false
2048
+ */
2049
+ verbatimModuleSyntax?: boolean;
2050
+
2051
+ /**
2052
+ Suppress deprecation warnings
2053
+ */
2054
+ ignoreDeprecations?: CompilerOptions.IgnoreDeprecations;
2055
+
2056
+ /**
2057
+ Do not allow runtime constructs that are not part of ECMAScript.
2058
+
2059
+ @default false
2060
+ */
2061
+ erasableSyntaxOnly?: boolean;
2062
+
2063
+ /**
2064
+ Enable lib replacement.
2065
+
2066
+ @default true
2067
+ */
2068
+ libReplacement?: boolean;
2069
+ };
2070
+
2071
+ namespace WatchOptions {
2072
+ export type WatchFileKind =
2073
+ | 'FixedPollingInterval'
2074
+ | 'PriorityPollingInterval'
2075
+ | 'DynamicPriorityPolling'
2076
+ | 'FixedChunkSizePolling'
2077
+ | 'UseFsEvents'
2078
+ | 'UseFsEventsOnParentDirectory';
2079
+
2080
+ export type WatchDirectoryKind =
2081
+ | 'UseFsEvents'
2082
+ | 'FixedPollingInterval'
2083
+ | 'DynamicPriorityPolling'
2084
+ | 'FixedChunkSizePolling';
2085
+
2086
+ export type PollingWatchKind =
2087
+ | 'FixedInterval'
2088
+ | 'PriorityInterval'
2089
+ | 'DynamicPriority'
2090
+ | 'FixedChunkSize';
2091
+ }
2092
+
2093
+ export type WatchOptions = {
2094
+
2095
+ /**
2096
+ Specify the strategy for watching individual files.
2097
+
2098
+ @default 'UseFsEvents'
2099
+ */
2100
+ watchFile?: WatchOptions.WatchFileKind | Lowercase<WatchOptions.WatchFileKind>;
2101
+
2102
+ /**
2103
+ Specify the strategy for watching directories under systems that lack recursive file-watching functionality.
2104
+
2105
+ @default 'UseFsEvents'
2106
+ */
2107
+ watchDirectory?: WatchOptions.WatchDirectoryKind | Lowercase<WatchOptions.WatchDirectoryKind>;
2108
+
2109
+ /**
2110
+ Specify the polling strategy to use when the system runs out of or doesn't support native file watchers.
2111
+ */
2112
+ fallbackPolling?: WatchOptions.PollingWatchKind | Lowercase<WatchOptions.PollingWatchKind>;
2113
+
2114
+ /**
2115
+ Enable synchronous updates on directory watchers for platforms that don't support recursive watching natively.
2116
+ */
2117
+ synchronousWatchDirectory?: boolean;
2118
+
2119
+ /**
2120
+ Specifies a list of directories to exclude from watch.
2121
+ */
2122
+ excludeDirectories?: string[];
2123
+
2124
+ /**
2125
+ Specifies a list of files to exclude from watch.
2126
+ */
2127
+ excludeFiles?: string[];
2128
+ };
2129
+
2130
+ /**
2131
+ Auto type (.d.ts) acquisition options for this project.
2132
+ */
2133
+ export type TypeAcquisition = {
2134
+ /**
2135
+ Enable auto type acquisition.
2136
+ */
2137
+ enable?: boolean;
2138
+
2139
+ /**
2140
+ Specifies a list of type declarations to be included in auto type acquisition. For example, `['jquery', 'lodash']`.
2141
+ */
2142
+ include?: string[];
2143
+
2144
+ /**
2145
+ Specifies a list of type declarations to be excluded from auto type acquisition. For example, `['jquery', 'lodash']`.
2146
+ */
2147
+ exclude?: string[];
2148
+
2149
+ /**
2150
+ Disable infering what types should be added based on filenames in a project.
2151
+ */
2152
+ disableFilenameBasedTypeAcquisition?: boolean;
2153
+ };
2154
+
2155
+ export type References = {
2156
+ /**
2157
+ A normalized path on disk.
2158
+ */
2159
+ path: string;
2160
+
2161
+ /**
2162
+ The path as the user originally wrote it.
2163
+ */
2164
+ originalPath?: string;
2165
+
2166
+ /**
2167
+ True if the output of this reference should be prepended to the output of this project.
2168
+
2169
+ Only valid for `--outFile` compilations.
2170
+ @deprecated This option will be removed in TypeScript 5.5.
2171
+ */
2172
+ prepend?: boolean;
2173
+
2174
+ /**
2175
+ True if it is intended that this reference form a circularity.
2176
+ */
2177
+ circular?: boolean;
2178
+ };
2179
+ }
2180
+
2181
+ /**
2182
+ Type for [TypeScript's `tsconfig.json` file](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) (TypeScript 3.7).
2183
+
2184
+ @category File
2185
+ */
2186
+ type TsConfigJson = {
2187
+ /**
2188
+ Instructs the TypeScript compiler how to compile `.ts` files.
2189
+ */
2190
+ compilerOptions?: TsConfigJson.CompilerOptions;
2191
+
2192
+ /**
2193
+ Instructs the TypeScript compiler how to watch files.
2194
+ */
2195
+ watchOptions?: TsConfigJson.WatchOptions;
2196
+
2197
+ /**
2198
+ Auto type (.d.ts) acquisition options for this project.
2199
+ */
2200
+ typeAcquisition?: TsConfigJson.TypeAcquisition;
2201
+
2202
+ /**
2203
+ Enable Compile-on-Save for this project.
2204
+ */
2205
+ compileOnSave?: boolean;
2206
+
2207
+ /**
2208
+ Path to base configuration file to inherit from.
2209
+ */
2210
+ extends?: string | string[];
2211
+
2212
+ /**
2213
+ 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.
2214
+ */
2215
+ files?: string[];
2216
+
2217
+ /**
2218
+ 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.
2219
+
2220
+ Glob patterns require TypeScript version 2.0 or later.
2221
+ */
2222
+ exclude?: string[];
2223
+
2224
+ /**
2225
+ Specifies a list of glob patterns that match files to be included in compilation.
2226
+
2227
+ 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`.
2228
+ */
2229
+ include?: string[];
2230
+
2231
+ /**
2232
+ Referenced projects.
2233
+ */
2234
+ references?: TsConfigJson.References[];
2235
+ };
2236
+
2237
+ type TsConfigJsonResolved = Except<TsConfigJson, "extends">;
2238
+ type TsConfigResult = {
2239
+ config: TsConfigJsonResolved;
2240
+ path: string;
2241
+ };
2242
+
2243
+ type HookCallback = (...arguments_: any) => Promise<void> | void;
2244
+ type HookKeys<T> = keyof T & string;
2245
+ type DeprecatedHook<T> = {
2246
+ message?: string;
2247
+ to: HookKeys<T>;
2248
+ };
2249
+ type ValueOf<C> = C extends Record<any, any> ? C[keyof C] : never;
2250
+ type Strings<T> = Exclude<keyof T, number | symbol>;
2251
+ type KnownKeys<T> = keyof {
2252
+ [K in keyof T as string extends K ? never : number extends K ? never : K]: never;
2253
+ };
2254
+ type StripGeneric<T> = Pick<T, KnownKeys<T> extends keyof T ? KnownKeys<T> : never>;
2255
+ type OnlyGeneric<T> = Omit<T, KnownKeys<T> extends keyof T ? KnownKeys<T> : never>;
2256
+ type Namespaces<T> = ValueOf<{
2257
+ [key in Strings<T>]: key extends `${infer Namespace}:${string}` ? Namespace : never;
2258
+ }>;
2259
+ type BareHooks<T> = ValueOf<{
2260
+ [key in Strings<T>]: key extends `${string}:${string}` ? never : key;
2261
+ }>;
2262
+ type HooksInNamespace<T, Namespace extends string> = ValueOf<{
2263
+ [key in Strings<T>]: key extends `${Namespace}:${infer HookName}` ? HookName : never;
2264
+ }>;
2265
+ type WithoutNamespace<T, Namespace extends string> = {
2266
+ [key in HooksInNamespace<T, Namespace>]: `${Namespace}:${key}` extends keyof T ? T[`${Namespace}:${key}`] : never;
2267
+ };
2268
+ type NestedHooks<T> = (Partial<StripGeneric<T>> | Partial<OnlyGeneric<T>>) & Partial<{
2269
+ [key in Namespaces<StripGeneric<T>>]: NestedHooks<WithoutNamespace<T, key>>;
2270
+ }> & Partial<{
2271
+ [key in BareHooks<StripGeneric<T>>]: T[key];
2272
+ }>;
2273
+
2274
+ type InferCallback<HT, HN extends keyof HT> = HT[HN] extends HookCallback ? HT[HN] : never;
2275
+ type InferSpyEvent<HT extends Record<string, any>> = {
2276
+ [key in keyof HT]: {
2277
+ name: key;
2278
+ args: Parameters<HT[key]>;
2279
+ context: Record<string, any>;
2280
+ };
2281
+ }[keyof HT];
2282
+ declare class Hookable<HooksT extends Record<string, any> = Record<string, HookCallback>, HookNameT extends HookKeys<HooksT> = HookKeys<HooksT>> {
2283
+ private _hooks;
2284
+ private _before?;
2285
+ private _after?;
2286
+ private _deprecatedHooks;
2287
+ private _deprecatedMessages?;
2288
+ constructor();
2289
+ hook<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>, options?: {
2290
+ allowDeprecated?: boolean;
2291
+ }): () => void;
2292
+ hookOnce<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>): () => void;
2293
+ removeHook<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>): void;
2294
+ deprecateHook<NameT extends HookNameT>(name: NameT, deprecated: HookKeys<HooksT> | DeprecatedHook<HooksT>): void;
2295
+ deprecateHooks(deprecatedHooks: Partial<Record<HookNameT, DeprecatedHook<HooksT>>>): void;
2296
+ addHooks(configHooks: NestedHooks<HooksT>): () => void;
2297
+ removeHooks(configHooks: NestedHooks<HooksT>): void;
2298
+ removeAllHooks(): void;
2299
+ callHook<NameT extends HookNameT>(name: NameT, ...arguments_: Parameters<InferCallback<HooksT, NameT>>): Promise<any>;
2300
+ callHookParallel<NameT extends HookNameT>(name: NameT, ...arguments_: Parameters<InferCallback<HooksT, NameT>>): Promise<any[]>;
2301
+ callHookWith<NameT extends HookNameT, CallFunction extends (hooks: HookCallback[], arguments_: Parameters<InferCallback<HooksT, NameT>>) => any>(caller: CallFunction, name: NameT, ...arguments_: Parameters<InferCallback<HooksT, NameT>>): ReturnType<CallFunction>;
2302
+ beforeEach(function_: (event: InferSpyEvent<HooksT>) => void): () => void;
2303
+ afterEach(function_: (event: InferSpyEvent<HooksT>) => void): () => void;
2304
+ }
2305
+
2306
+ /**
2307
+ * Jiti instance
2308
+ *
2309
+ * Calling jiti() is similar to CommonJS require() but adds extra features such as Typescript and ESM compatibility.
2310
+ *
2311
+ * **Note:**It is recommended to use `await jiti.import` instead
2312
+ */
2313
+ interface Jiti extends NodeRequire {
2314
+ /**
2315
+ * Resolved options
2316
+ */
2317
+ options: JitiOptions;
2318
+
2319
+ /**
2320
+ * ESM import a module with additional Typescript and ESM compatibility.
2321
+ *
2322
+ * If you need the default export of module, you can use `jiti.import(id, { default: true })` as shortcut to `mod?.default ?? mod`.
2323
+ */
2324
+ import<T = unknown>(
2325
+ id: string,
2326
+ opts?: JitiResolveOptions & { default?: true },
2327
+ ): Promise<T>;
2328
+
2329
+ /**
2330
+ * Resolve with ESM import conditions.
2331
+ */
2332
+ esmResolve(id: string, parentURL?: string): string;
2333
+ esmResolve<T extends JitiResolveOptions = JitiResolveOptions>(
2334
+ id: string,
2335
+ opts?: T,
2336
+ ): T["try"] extends true ? string | undefined : string;
2337
+
2338
+ /**
2339
+ * Transform source code
2340
+ */
2341
+ transform: (opts: TransformOptions) => string;
2342
+
2343
+ /**
2344
+ * Evaluate transformed code as a module
2345
+ */
2346
+ evalModule: (source: string, options?: EvalModuleOptions) => unknown;
2347
+ }
2348
+
2349
+ /**
2350
+ * Jiti instance options
2351
+ */
2352
+ interface JitiOptions {
2353
+ /**
2354
+ * Filesystem source cache (enabled by default)
2355
+ *
2356
+ * An string can be passed to set the custom cache directory.
2357
+ *
2358
+ * By default (when is `true`), jiti uses `node_modules/.cache/jiti` (if exists) or `{TMP_DIR}/jiti`.
2359
+ *
2360
+ * This option can also be disabled using `JITI_FS_CACHE=false` environment variable.
2361
+ *
2362
+ * **Note:** It is recommended to keep this option enabled for better performance.
2363
+ */
2364
+ fsCache?: boolean | string;
2365
+
2366
+ /** @deprecated Use `fsCache` option. */
2367
+ cache?: boolean | string;
2368
+
2369
+ /**
2370
+ * Runtime module cache (enabled by default)
2371
+ *
2372
+ * Disabling allows editing code and importing same module multiple times.
2373
+ *
2374
+ * When enabled, jiti integrates with Node.js native CommonJS cache store.
2375
+ *
2376
+ * This option can also be disabled using `JITI_MODULE_CACHE=false` environment variable.
2377
+ */
2378
+ moduleCache?: boolean;
2379
+
2380
+ /** @deprecated Use `moduleCache` option. */
2381
+ requireCache?: boolean;
2382
+
2383
+ /**
2384
+ * Custom transform function
2385
+ */
2386
+ transform?: (opts: TransformOptions) => TransformResult;
2387
+
2388
+ /**
2389
+ * Enable verbose debugging (disabled by default).
2390
+ *
2391
+ * Can also be enabled using `JITI_DEBUG=1` environment variable.
2392
+ */
2393
+ debug?: boolean;
2394
+
2395
+ /**
2396
+ * Enable sourcemaps (enabled by default)
2397
+ *
2398
+ * Can also be disabled using `JITI_SOURCE_MAPS=0` environment variable.
2399
+ */
2400
+ sourceMaps?: boolean;
2401
+
2402
+ /**
2403
+ * Jiti combines module exports with the `default` export using an internal Proxy to improve compatibility with mixed CJS/ESM usage. You can check the current implementation [here](https://github.com/unjs/jiti/blob/main/src/utils.ts#L105).
2404
+ *
2405
+ * Can be disabled using `JITI_INTEROP_DEFAULT=0` environment variable.
2406
+ */
2407
+ interopDefault?: boolean;
2408
+
2409
+ /**
2410
+ * Jiti hard source cache version (internal)
2411
+ */
2412
+ cacheVersion?: string;
2413
+
2414
+ /**
2415
+ * Supported extensions to resolve.
2416
+ *
2417
+ * Default `[".js", ".mjs", ".cjs", ".ts", ".mts", ".cts", ".json"]`
2418
+ */
2419
+ extensions?: string[];
2420
+
2421
+ /**
2422
+ * Transform options
2423
+ */
2424
+ transformOptions?: Omit<TransformOptions, "source">;
2425
+
2426
+ /**
2427
+ * Resolve aliases
2428
+ *
2429
+ * You can use `JITI_ALIAS` environment variable to set aliases as a JSON string.
2430
+ */
2431
+ alias?: Record<string, string>;
2432
+
2433
+ /**
2434
+ * List of modules (within `node_modules`) to always use native require/import for them.
2435
+ *
2436
+ * You can use `JITI_NATIVE_MODULES` environment variable to set native modules as a JSON string.
2437
+ *
2438
+ */
2439
+ nativeModules?: string[];
2440
+
2441
+ /**
2442
+ * List of modules (within `node_modules`) to transform them regardless of syntax.
2443
+ *
2444
+ * You can use `JITI_TRANSFORM_MODULES` environment variable to set transform modules as a JSON string.
2445
+ */
2446
+ transformModules?: string[];
2447
+
2448
+ /**
2449
+ * Parent module's import.meta context to use for ESM resolution.
2450
+ *
2451
+ * (Only used for `jiti/native` import)
2452
+ */
2453
+ importMeta?: ImportMeta;
2454
+
2455
+ /**
2456
+ * Try to use native require and import without jiti transformations first.
2457
+ *
2458
+ * Enabled if Bun is detected.
2459
+ */
2460
+ tryNative?: boolean;
2461
+
2462
+ /**
2463
+ * Enable JSX support Enable JSX support using [`@babel/plugin-transform-react-jsx`](https://babeljs.io/docs/babel-plugin-transform-react-jsx).
2464
+ *
2465
+ * @default false
2466
+ *
2467
+ * You can also use `JITI_JSX=1` environment variable to enable JSX support.
2468
+ */
2469
+ jsx?: boolean | JSXOptions;
2470
+ }
2471
+
2472
+ interface NodeRequire {
2473
+ /**
2474
+ * Module cache
2475
+ */
2476
+ cache: ModuleCache;
2477
+
2478
+ /** @deprecated Prefer `await jiti.import()` for better compatibility. */
2479
+ (id: string): any;
2480
+
2481
+ /** @deprecated Prefer `jiti.esmResolve` for better compatibility. */
2482
+ resolve: {
2483
+ /** @deprecated */
2484
+ (id: string, options?: { paths?: string[] | undefined }): string;
2485
+ /** @deprecated */
2486
+ paths(request: string): string[] | null;
2487
+ };
2488
+
2489
+ /** @deprecated CommonJS API */
2490
+ extensions: Record<
2491
+ ".js" | ".json" | ".node",
2492
+ (m: NodeModule, filename: string) => any | undefined
2493
+ >;
2494
+
2495
+ /** @deprecated CommonJS API */
2496
+ main: NodeModule | undefined;
2497
+ }
2498
+
2499
+ interface NodeModule {
2500
+ /**
2501
+ * `true` if the module is running during the Node.js preload
2502
+ */
2503
+ isPreloading: boolean;
2504
+ exports: any;
2505
+ require: NodeRequire;
2506
+ id: string;
2507
+ filename: string;
2508
+ loaded: boolean;
2509
+ /** @deprecated since v14.6.0 Please use `require.main` and `module.children` instead. */
2510
+ parent: NodeModule | null | undefined;
2511
+ children: NodeModule[];
2512
+ /**
2513
+ * @since v11.14.0
2514
+ *
2515
+ * The directory name of the module. This is usually the same as the path.dirname() of the module.id.
2516
+ */
2517
+ path: string;
2518
+ paths: string[];
2519
+ }
2520
+
2521
+ type ModuleCache = Record<string, NodeModule>;
2522
+
2523
+ type EvalModuleOptions = Partial<{
2524
+ id: string;
2525
+ filename: string;
2526
+ ext: string;
2527
+ cache: ModuleCache;
2528
+ async: boolean;
2529
+ forceTranspile: boolean;
2530
+ }>;
2531
+
2532
+ interface TransformOptions {
2533
+ source: string;
2534
+ filename?: string;
2535
+ ts?: boolean;
2536
+ retainLines?: boolean;
2537
+ interopDefault?: boolean;
2538
+ async?: boolean;
2539
+ jsx?: boolean | JSXOptions;
2540
+ babel?: Record<string, any>;
2541
+ }
2542
+
2543
+ interface TransformResult {
2544
+ code: string;
2545
+ error?: any;
2546
+ }
2547
+
2548
+ interface JitiResolveOptions {
2549
+ conditions?: string[];
2550
+ parentURL?: string | URL;
2551
+ try?: boolean;
2552
+ }
2553
+
2554
+ /** Reference: https://babeljs.io/docs/babel-plugin-transform-react-jsx#options */
2555
+ interface JSXOptions {
2556
+ throwIfNamespace?: boolean;
2557
+ runtime?: "classic" | "automatic";
2558
+ importSource?: string;
2559
+ pragma?: string;
2560
+ pragmaFrag?: string;
2561
+ useBuiltIns?: boolean;
2562
+ useSpread?: boolean;
2563
+ }
2564
+
2565
+ type Environment = "production" | "development" | undefined;
2566
+ type Mode = "build" | "jit" | "watch";
2567
+ type Format = "cjs" | "esm";
2568
+ type Runtime = "browser" | "bun" | "deno" | "edge-light" | "electron" | "node" | "react-native" | "react-server" | "workerd" | undefined;
2569
+
2570
+ interface BuildHooks<T> {
2571
+ "build:before": (context: BuildContext<T>) => Promise<void> | void;
2572
+ "build:done": (context: BuildContext<T>) => Promise<void> | void;
2573
+ "build:prepare": (context: BuildContext<T>) => Promise<void> | void;
2574
+ "builder:before": (name: string, context: BuildContext<T>) => Promise<void> | void;
2575
+ "builder:done": (name: string, context: BuildContext<T>) => Promise<void> | void;
2576
+ "rollup:build": (context: BuildContext<T>, build: RollupBuild) => Promise<void> | void;
2577
+ "rollup:done": (context: BuildContext<T>) => Promise<void> | void;
2578
+ "rollup:dts:build": (context: BuildContext<T>, build: RollupBuild) => Promise<void> | void;
2579
+ "rollup:dts:done": (context: BuildContext<T>) => Promise<void> | void;
2580
+ "rollup:dts:options": (context: BuildContext<T>, options: RollupOptions) => Promise<void> | void;
2581
+ "rollup:options": (context: BuildContext<T>, options: RollupOptions) => Promise<void> | void;
2582
+ "rollup:watch": (context: BuildContext<T>, watcher: RollupWatcher) => Promise<void> | void;
2583
+ "typedoc:before": (context: BuildContext<T>) => Promise<void> | void;
2584
+ "typedoc:done": (context: BuildContext<T>) => Promise<void> | void;
2585
+ "validate:before": (context: BuildContext<T>) => Promise<void> | void;
2586
+ "validate:done": (context: BuildContext<T>) => Promise<void> | void;
2587
+ }
2588
+ type BuildContext<T> = {
2589
+ buildEntries: (BuildContextBuildAssetAndChunk | BuildContextBuildEntry)[];
2590
+ dependencyGraphMap: Map<string, Set<[string, string]>>;
2591
+ environment: Environment;
2592
+ hoistedDependencies: Set<string>;
2593
+ hooks: Hookable<BuildHooks<T>>;
2594
+ implicitDependencies: Set<string>;
2595
+ jiti: Jiti;
2596
+ logger: PailServerType;
2597
+ mode: Mode;
2598
+ options: T;
2599
+ pkg: PackageJson;
2600
+ tsconfig?: TsConfigResult;
2601
+ usedDependencies: Set<string>;
2602
+ warnings: Set<string>;
2603
+ };
2604
+ type BuildContextBuildAssetAndChunk = {
2605
+ chunk?: boolean;
2606
+ chunks?: string[];
2607
+ dynamicImports?: string[];
2608
+ exports?: string[];
2609
+ modules?: {
2610
+ bytes: number;
2611
+ id: string;
2612
+ }[];
2613
+ path: string;
2614
+ size?: {
2615
+ brotli?: number;
2616
+ bytes?: number;
2617
+ gzip?: number;
2618
+ };
2619
+ type?: "asset" | "chunk";
2620
+ };
2621
+ type BuildContextBuildEntry = {
2622
+ chunk?: boolean;
2623
+ chunks?: string[];
2624
+ dynamicImports?: string[];
2625
+ exports?: string[];
2626
+ modules?: {
2627
+ bytes: number;
2628
+ id: string;
2629
+ }[];
2630
+ path: string;
2631
+ size?: {
2632
+ brotli?: number;
2633
+ bytes?: number;
2634
+ gzip?: number;
2635
+ };
2636
+ type?: "entry";
2637
+ };
2638
+
2639
+ type Node10CompatibilityOptions = {
2640
+ typeScriptVersion?: string;
2641
+ writeToPackageJson?: boolean;
2642
+ };
2643
+
2644
+ type MaybeFalsy<T> = T | false | null | undefined;
2645
+ type ResolveExternalsPluginOptions = {
2646
+ builtins?: boolean;
2647
+ builtinsPrefix?: "add" | "ignore" | "strip";
2648
+ deps?: boolean;
2649
+ devDeps?: boolean;
2650
+ exclude?: MaybeFalsy<RegExp | string>[];
2651
+ optDeps?: boolean;
2652
+ peerDeps?: boolean;
2653
+ };
2654
+
2655
+ type DeepPartial<T> = {
2656
+ [P in keyof T]?: DeepPartial<T[P]>;
2657
+ };
2658
+ interface BuildConfig extends DeepPartial<Omit<BuildOptions, "entries">> {
2659
+ entries?: (BuildEntry | string)[];
2660
+ hooks?: Partial<BuildHooks<InternalBuildOptions>>;
2661
+ preset?: BuildPreset | "auto" | "none" | (NonNullable<unknown> & string);
2662
+ }
2663
+ type BuildPreset = BuildConfig | (() => BuildConfig);
2664
+ type BuildConfigFunction = (environment: Environment, mode: Mode) => BuildConfig | Promise<BuildConfig>;
2665
+ type BuildEntry = {
2666
+ cjs?: boolean;
2667
+ declaration?: boolean | "compatible" | "node16";
2668
+ environment?: Environment;
2669
+ esm?: boolean;
2670
+ executable?: true;
2671
+ exportKey?: Set<string>;
2672
+ fileAlias?: string;
2673
+ input: string;
2674
+ isGlob?: boolean;
2675
+ name?: string;
2676
+ outDir?: string;
2677
+ runtime?: Runtime;
2678
+ };
2679
+ interface BuildOptions {
2680
+ alias: Record<string, string>;
2681
+ analyze?: boolean;
2682
+ browserTargets?: string[];
2683
+ builder?: Record<string, (context: BuildContext<BuildOptions>, cachePath: string | undefined, fileCache: FileCache, logged: boolean) => Promise<void>>;
2684
+ cjsInterop?: boolean;
2685
+ clean: boolean;
2686
+ debug: boolean;
2687
+ declaration?: boolean | "compatible" | "node16" | undefined;
2688
+ dtsOnly?: boolean;
2689
+ emitCJS?: boolean;
2690
+ emitESM?: boolean;
2691
+ entries: BuildEntry[];
2692
+ experimental?: {
2693
+ oxcResolve?: boolean;
2694
+ };
2695
+ externals: (RegExp | string)[];
2696
+ failOnWarn?: boolean;
2697
+ fileCache?: boolean;
2698
+ isolatedDeclarationTransformer?: IsolatedDeclarationsTransformer;
2699
+ jiti: Omit<JitiOptions$1, "onError" | "transform">;
2700
+ killSignal?: KillSignal;
2701
+ minify?: boolean | undefined;
2702
+ name: string;
2703
+ node10Compatibility?: Node10CompatibilityOptions | false;
2704
+ onSuccess?: string | (() => Promise<(() => Promise<void> | void) | undefined | void>);
2705
+ onSuccessTimeout?: number;
2706
+ outDir: string;
2707
+ outputExtensionMap?: Record<Format, string>;
2708
+ rollup: RollupBuildOptions;
2709
+ rootDir: string;
2710
+ runtime?: "browser" | "node";
2711
+ sourceDir: string;
2712
+ sourcemap: boolean;
2713
+ transformer: TransformerFn;
2714
+ typedoc: TypeDocumentOptions | false;
2715
+ validation?: ValidationOptions | false;
2716
+ }
2717
+ interface InternalBuildOptions extends BuildOptions {
2718
+ rollup: Omit<BuildOptions["rollup"], "oxc"> & {
2719
+ oxc?: InternalOXCTransformPluginConfig;
2720
+ };
2721
+ transformerName: TransformerName | undefined;
2722
+ }
2723
+ type KillSignal = "SIGKILL" | "SIGTERM";
2724
+ interface RollupBuildOptions extends PackemRollupOptions {
2725
+ css?: StyleOptions | false;
2726
+ node10Compatibility?: Node10CompatibilityOptions | false;
2727
+ resolveExternals?: ResolveExternalsPluginOptions;
2728
+ }
2729
+ type TypeDocumentOptions = Partial<Omit<TypeDocOptions, "entryPoints" | "hideGenerator" | "out" | "preserveWatchOutput" | "watch">> & {
2730
+ format?: "html" | "inline" | "json" | "markdown";
2731
+ jsonFileName?: string;
2732
+ marker?: string;
2733
+ output?: string;
2734
+ readmePath?: string;
2735
+ };
2736
+ type ValidationOptions = {
2737
+ bundleLimit?: {
2738
+ allowFail?: boolean;
2739
+ limit?: number | `${number}${"B" | "GB" | "KB" | "MB" | "TB"}`;
2740
+ limits?: Record<string, number | `${number}${"B" | "GB" | "KB" | "MB" | "TB"}`>;
2741
+ };
2742
+ dependencies: {
2743
+ hoisted: {
2744
+ exclude: string[];
2745
+ } | false;
2746
+ unused: {
2747
+ exclude: string[];
2748
+ } | false;
2749
+ } | false;
2750
+ packageJson?: {
2751
+ bin?: boolean;
2752
+ dependencies?: boolean;
2753
+ engines?: boolean;
2754
+ exports?: boolean;
2755
+ extraConditions?: string[];
2756
+ files?: boolean;
2757
+ main?: boolean;
2758
+ module?: boolean;
2759
+ name?: boolean;
2760
+ types?: boolean;
2761
+ typesVersions?: boolean;
2762
+ };
2763
+ };
2764
+
2765
+ export type { BuildConfig as B, Environment as E, InternalBuildOptions as I, Mode as M, RollupBuildOptions as R, BuildEntry as a, BuildOptions as b, BuildContext as c, BuildContextBuildAssetAndChunk as d, BuildContextBuildEntry as e, BuildHooks as f, Runtime as g, BuildConfigFunction as h, BuildPreset as i };