rolldown-plugin-dts 0.27.12 → 0.27.13
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.
- package/dist/{index-DVUThtUr.d.mts → index-D4idJQx0.d.mts} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +5 -2
- package/dist/internal.d.mts +1 -1
- package/dist/tsc-worker.d.mts +1 -1
- package/dist/tsc.d.mts +1 -1
- package/dist/{volar-ynbQeQZt.d.mts → volar-Cxz5qLKE.d.mts} +3 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as VolarPlugin, t as VolarContext } from "./volar-
|
|
1
|
+
import { n as VolarPlugin, t as VolarContext } from "./volar-Cxz5qLKE.mjs";
|
|
2
2
|
import { Plugin } from "rolldown";
|
|
3
3
|
import { IsolatedDeclarationsOptions } from "rolldown/experimental";
|
|
4
4
|
import { TsconfigJson } from "get-tsconfig";
|
package/dist/index.mjs
CHANGED
|
@@ -1240,15 +1240,18 @@ var VolarContext = class {
|
|
|
1240
1240
|
}
|
|
1241
1241
|
getExtraFileExtensions() {
|
|
1242
1242
|
if (!this.plugins.length) return;
|
|
1243
|
-
return this.plugins.flatMap((plugin) => plugin.tsFileExtensionInfos);
|
|
1243
|
+
return this.plugins.flatMap((plugin) => plugin.tsFileExtensionInfos || []);
|
|
1244
1244
|
}
|
|
1245
1245
|
getCreateProgram(ts) {
|
|
1246
1246
|
if (!this.plugins.length) return ts.createProgram;
|
|
1247
|
-
const
|
|
1247
|
+
const volarTypeScript = this.plugins.find((plugin) => plugin.volarTypeScript)?.volarTypeScript;
|
|
1248
|
+
if (!volarTypeScript) return ts.createProgram;
|
|
1249
|
+
const { proxyCreateProgram } = volarTypeScript;
|
|
1248
1250
|
return proxyCreateProgram(ts, ts.createProgram, (ts, options) => {
|
|
1249
1251
|
const setups = [];
|
|
1250
1252
|
const plugins = [];
|
|
1251
1253
|
for (const plugin of this.plugins) {
|
|
1254
|
+
if (!plugin.create) continue;
|
|
1252
1255
|
const result = plugin.create(ts, options);
|
|
1253
1256
|
if (Array.isArray(result)) plugins.push(...result);
|
|
1254
1257
|
else {
|
package/dist/internal.d.mts
CHANGED
package/dist/tsc-worker.d.mts
CHANGED
package/dist/tsc.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as TscResult, n as TscModule, r as TscOptions, t as tscEmit } from "./index-
|
|
1
|
+
import { i as TscResult, n as TscModule, r as TscOptions, t as tscEmit } from "./index-D4idJQx0.mjs";
|
|
2
2
|
export { type TscModule, type TscOptions, type TscResult, tscEmit };
|
|
@@ -2,9 +2,9 @@ import { FileExtensionInfo } from "typescript";
|
|
|
2
2
|
//#region src/volar.d.ts
|
|
3
3
|
interface VolarPlugin {
|
|
4
4
|
extensionPatterns: RegExp[];
|
|
5
|
-
tsFileExtensionInfos
|
|
6
|
-
volarTypeScript
|
|
7
|
-
create
|
|
5
|
+
tsFileExtensionInfos?: FileExtensionInfo[];
|
|
6
|
+
volarTypeScript?: typeof import("@volar/typescript");
|
|
7
|
+
create?: Parameters<(typeof import("@volar/typescript"))["proxyCreateProgram"]>[2];
|
|
8
8
|
toTsFilename?: (id: string) => string;
|
|
9
9
|
}
|
|
10
10
|
declare class VolarContext {
|