@typescript/native-preview 7.0.0-dev.20260624.1 → 7.0.0-dev.20260627.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.
- package/NOTICE.txt +1 -1
- package/bin/tsgo +2 -0
- package/dist/api/async/api.d.ts +79 -11
- package/dist/api/async/api.d.ts.map +1 -1
- package/dist/api/async/api.js +270 -5
- package/dist/api/async/api.js.map +1 -1
- package/dist/api/async/types.d.ts +55 -6
- package/dist/api/async/types.d.ts.map +1 -1
- package/dist/api/node/node.d.ts +6 -0
- package/dist/api/node/node.d.ts.map +1 -1
- package/dist/api/node/node.js +36 -6
- package/dist/api/node/node.js.map +1 -1
- package/dist/api/sync/api.d.ts +79 -11
- package/dist/api/sync/api.d.ts.map +1 -1
- package/dist/api/sync/api.js +270 -5
- package/dist/api/sync/api.js.map +1 -1
- package/dist/api/sync/types.d.ts +55 -6
- package/dist/api/sync/types.d.ts.map +1 -1
- package/dist/ast/factory.generated.d.ts.map +1 -1
- package/dist/ast/factory.generated.js +10 -2
- package/dist/ast/factory.generated.js.map +1 -1
- package/dist/ast/is.generated.d.ts +2 -1
- package/dist/ast/is.generated.d.ts.map +1 -1
- package/dist/ast/is.generated.js +3 -0
- package/dist/ast/is.generated.js.map +1 -1
- package/dist/ast/utils.d.ts +2 -0
- package/dist/ast/utils.d.ts.map +1 -1
- package/dist/ast/utils.js +20 -0
- package/dist/ast/utils.js.map +1 -1
- package/lib/getExePath.js +16 -4
- package/{bin → lib}/tsgo.js +28 -28
- package/lib/version.cjs +3 -0
- package/lib/version.d.cts +2 -0
- package/package.json +16 -14
|
@@ -3,6 +3,7 @@ import { NodeFlags } from "#enums/nodeFlags";
|
|
|
3
3
|
import { SyntaxKind } from "#enums/syntaxKind";
|
|
4
4
|
import { TokenFlags } from "#enums/tokenFlags";
|
|
5
5
|
import { getTokenPosOfNode } from "./astnav.js";
|
|
6
|
+
import { cloneSourceFileData } from "./utils.js";
|
|
6
7
|
import { forEachChildOfJSDocParameterTag, forEachChildOfJSDocPropertyTag, } from "./visitor.js";
|
|
7
8
|
export class NodeObject {
|
|
8
9
|
kind;
|
|
@@ -821,7 +822,7 @@ function cloneNodeData(node) {
|
|
|
821
822
|
case SyntaxKind.JSDocPropertyTag:
|
|
822
823
|
return { tagName: n.tagName, name: n.name, isBracketed: n.isBracketed, typeExpression: n.typeExpression, isNameFirst: n.isNameFirst, comment: n.comment };
|
|
823
824
|
case SyntaxKind.SourceFile:
|
|
824
|
-
return
|
|
825
|
+
return cloneSourceFileData(n);
|
|
825
826
|
default:
|
|
826
827
|
return undefined;
|
|
827
828
|
}
|
|
@@ -3041,9 +3042,16 @@ export function createSourceFile(statements, endOfFileToken, text, fileName, pat
|
|
|
3041
3042
|
path,
|
|
3042
3043
|
});
|
|
3043
3044
|
}
|
|
3045
|
+
function cloneSourceFileWithChanges(source, statements, endOfFileToken) {
|
|
3046
|
+
return new NodeObject(SyntaxKind.SourceFile, {
|
|
3047
|
+
...cloneSourceFileData(source),
|
|
3048
|
+
statements: createNodeArray(statements),
|
|
3049
|
+
endOfFileToken,
|
|
3050
|
+
});
|
|
3051
|
+
}
|
|
3044
3052
|
export function updateSourceFile(node, statements, endOfFileToken) {
|
|
3045
3053
|
return node.statements !== statements || node.endOfFileToken !== endOfFileToken
|
|
3046
|
-
?
|
|
3054
|
+
? cloneSourceFileWithChanges(node, statements, endOfFileToken)
|
|
3047
3055
|
: node;
|
|
3048
3056
|
}
|
|
3049
3057
|
//# sourceMappingURL=factory.generated.js.map
|