typescript 7.1.0-dev.20261007.1 → 7.1.0-dev.20261009.1
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/api/async/api.d.ts +16 -53
- package/dist/api/async/api.d.ts.map +1 -1
- package/dist/api/async/api.js +35 -79
- package/dist/api/async/api.js.map +1 -1
- package/dist/api/node/node.d.ts +0 -7
- package/dist/api/node/node.d.ts.map +1 -1
- package/dist/api/node/node.js +0 -1
- package/dist/api/node/node.js.map +1 -1
- package/dist/api/path.d.ts +0 -29
- package/dist/api/path.d.ts.map +1 -1
- package/dist/api/proto.d.ts +1 -16
- package/dist/api/proto.d.ts.map +1 -1
- package/dist/api/proto.generated.d.ts +12 -16
- package/dist/api/proto.generated.d.ts.map +1 -1
- package/dist/api/proto.js +0 -15
- package/dist/api/proto.js.map +1 -1
- package/dist/api/sync/api.d.ts +19 -74
- package/dist/api/sync/api.d.ts.map +1 -1
- package/dist/api/sync/api.js +50 -126
- package/dist/api/sync/api.js.map +1 -1
- package/dist/ast/ast.d.ts +1 -4
- package/dist/ast/ast.d.ts.map +1 -1
- package/dist/ast/ast.js +1 -0
- package/dist/ast/ast.js.map +1 -1
- package/dist/ast/astnav.d.ts +0 -2
- package/dist/ast/astnav.d.ts.map +1 -1
- package/dist/ast/factory.generated.d.ts +0 -159
- package/dist/ast/factory.generated.d.ts.map +1 -1
- package/dist/ast/factory.generated.js +1 -0
- package/dist/ast/factory.generated.js.map +1 -1
- package/dist/ast/is.d.ts +1 -12
- package/dist/ast/is.d.ts.map +1 -1
- package/dist/vscode/extensionApi.d.ts +46 -2
- package/dist/vscode/extensionApi.d.ts.map +1 -1
- package/dist/vscode/extensionApi.js +1 -1
- package/dist/vscode/extensionApi.js.map +1 -1
- package/dist/vscode/moduleLoader.d.ts +14 -0
- package/dist/vscode/moduleLoader.d.ts.map +1 -0
- package/dist/vscode/moduleLoader.js +36 -0
- package/dist/vscode/moduleLoader.js.map +1 -0
- package/package.json +22 -24
package/dist/ast/is.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { AsExpression, BindingPattern, BlockOrExpression, BooleanLiteral, ConciseBody, ExclamationToken, Expression, ExpressionWithTypeArguments, ForInitializer, Identifier, JSDocTypeExpression, JSDocTypeLiteral, JsxTagNameExpression, LeftHandSideExpression, LiteralExpression, MinusToken, ModuleDeclaration, Node, NonNullExpression, NullLiteral, ParenthesizedExpression, PartiallyEmittedExpression, PlusToken, PrefixUnaryExpression, QuestionToken, ReadonlyKeyword, SatisfiesExpression, Statement, TemplateMiddle, TemplateTail, ThisTypeNode, TypeAssertion, TypeNode, UnaryExpressionBase } from "./ast.ts";
|
|
1
|
+
import type { BindingPattern, BlockOrExpression, BooleanLiteral, ConciseBody, ExclamationToken, Expression, ForInitializer, Identifier, JSDocTypeExpression, JSDocTypeLiteral, JsxTagNameExpression, LeftHandSideExpression, LiteralExpression, MinusToken, ModuleDeclaration, Node, NullLiteral, PlusToken, PrefixUnaryExpression, QuestionToken, ReadonlyKeyword, Statement, TemplateMiddle, TemplateTail, ThisTypeNode, TypeNode, UnaryExpressionBase } from "./ast.ts";
|
|
3
2
|
export * from "./is.generated.ts";
|
|
4
3
|
type JSDocNamespaceDeclaration = ModuleDeclaration;
|
|
5
|
-
type WrappedExpression<T extends Expression> = ParenthesizedExpression | TypeAssertion | AsExpression | SatisfiesExpression | ExpressionWithTypeArguments | NonNullExpression | PartiallyEmittedExpression;
|
|
6
|
-
type OuterExpression = WrappedExpression<Expression>;
|
|
7
4
|
export declare function isTypeNode(node: Node): node is TypeNode;
|
|
8
5
|
export declare function isStatement(node: Node): node is Statement;
|
|
9
6
|
export declare function isExpression(node: Node): node is Expression;
|
|
@@ -13,14 +10,6 @@ export declare function isLeftHandSideExpression(node: Node): node is LeftHandSi
|
|
|
13
10
|
export declare function skipPartiallyEmittedExpressions(node: Expression): Expression;
|
|
14
11
|
export declare function skipPartiallyEmittedExpressions(node: Node): Node;
|
|
15
12
|
export declare function isUnaryExpression(node: Node): node is UnaryExpressionBase;
|
|
16
|
-
/** @internal */
|
|
17
|
-
export declare function isOuterExpression(node: Node, kinds?: OuterExpressionKinds): node is OuterExpression;
|
|
18
|
-
/** @internal */
|
|
19
|
-
export declare function skipOuterExpressions<T extends Expression>(node: WrappedExpression<T>): T;
|
|
20
|
-
/** @internal */
|
|
21
|
-
export declare function skipOuterExpressions(node: Expression, kinds?: OuterExpressionKinds): Expression;
|
|
22
|
-
/** @internal */
|
|
23
|
-
export declare function skipOuterExpressions(node: Node, kinds?: OuterExpressionKinds): Node;
|
|
24
13
|
export declare function isBindingPattern(node: Node): node is BindingPattern;
|
|
25
14
|
export declare function isConciseBody(node: Node): node is ConciseBody;
|
|
26
15
|
export declare function isForInitializer(node: Node): node is ForInitializer;
|
package/dist/ast/is.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is.d.ts","sourceRoot":"","sources":["../../src/ast/is.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"is.d.ts","sourceRoot":"","sources":["../../src/ast/is.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAER,cAAc,EACd,iBAAiB,EACjB,cAAc,EAEd,WAAW,EACX,gBAAgB,EAChB,UAAU,EAEV,cAAc,EAGd,UAAU,EACV,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EAEjB,UAAU,EACV,iBAAiB,EACjB,IAAI,EAEJ,WAAW,EAGX,SAAS,EACT,qBAAqB,EACrB,aAAa,EACb,eAAe,EAEf,SAAS,EACT,cAAc,EACd,YAAY,EACZ,YAAY,EAEZ,QAAQ,EACR,mBAAmB,EACtB,MAAM,UAAU,CAAC;AAsBlB,cAAc,mBAAmB,CAAC;AAElC,KAAK,yBAAyB,GAAG,iBAAiB,CAAC;AAanD,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,I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ED,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,cAAc,GAAG,YAAY,CAEhG;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,WAAW,GAAG,cAAc,GAAG,iBAAiB,GAAG,qBAAqB,CAKjI;AAED,wBAAgB,uCAAuC,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,UAAU,GAAG,yBAAyB,CAElH;AAED,wBAAgB,uCAAuC,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,mBAAmB,GAAG,gBAAgB,CAElH;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,oBAAoB,CAM/E"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import type { TypeScriptModuleLoader } from "./moduleLoader.ts";
|
|
1
2
|
import type { LspMiddlewareRequests } from "./protocol.generated.ts";
|
|
3
|
+
export { createTypeScriptModuleLoader, type TypeScriptModuleLoader } from "./moduleLoader.ts";
|
|
2
4
|
export type * from "./protocol.generated.ts";
|
|
3
5
|
export interface Disposable {
|
|
4
6
|
dispose(): unknown;
|
|
@@ -35,9 +37,51 @@ export type LspMiddlewareContext<M extends LspMiddlewareMethod> = {
|
|
|
35
37
|
readonly params: DeepReadonly<LspMiddlewareRequests[M]["params"]>;
|
|
36
38
|
};
|
|
37
39
|
export type LspMiddlewareTransformer<M extends LspMiddlewareMethod> = (result: LspMiddlewareResult<M>, context: LspMiddlewareContext<M>) => LspMiddlewareResult<M> | PromiseLike<LspMiddlewareResult<M>>;
|
|
38
|
-
export interface
|
|
39
|
-
|
|
40
|
+
export interface APIModules {
|
|
41
|
+
"typescript/async": typeof import("../api/async/api.ts");
|
|
42
|
+
"typescript/sync": typeof import("../api/sync/api.ts");
|
|
43
|
+
"typescript/fs": typeof import("../api/fs.ts");
|
|
44
|
+
"typescript/path": typeof import("../api/typedPaths.ts");
|
|
45
|
+
"typescript/proto": typeof import("../api/proto.ts");
|
|
46
|
+
"typescript/ast": typeof import("../ast/index.ts");
|
|
47
|
+
"typescript/ast/is": typeof import("../ast/is.ts");
|
|
48
|
+
"typescript/ast/factory": typeof import("../ast/factory.generated.ts");
|
|
49
|
+
"typescript/ast/utils": typeof import("../ast/utils.ts");
|
|
50
|
+
"typescript/ast/scanner": typeof import("../ast/scanner.ts");
|
|
51
|
+
"typescript/ast/visitor": typeof import("../ast/visitor.ts");
|
|
52
|
+
"typescript/ast/clone": typeof import("../ast/clone.ts");
|
|
53
|
+
[exportPath: string]: unknown;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The selected TypeScript installation and its module loader.
|
|
57
|
+
* Restart TS Server offers to restart extensions if an acquired installation's
|
|
58
|
+
* version changed on disk, without first restarting the server.
|
|
59
|
+
*/
|
|
60
|
+
export interface TypeScriptSDK extends TypeScriptModuleLoader {
|
|
61
|
+
readonly version: string;
|
|
62
|
+
/** The matching API package manifest; undefined for a bare executable without a companion package. */
|
|
63
|
+
readonly packageJsonPath: string | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Whether an initialized language server currently uses this installation.
|
|
66
|
+
* False while stopped or restarting; true again after a same-installation restart.
|
|
67
|
+
* This is a synchronous snapshot, not a guarantee for subsequent async operations
|
|
68
|
+
* or a check for changes on disk.
|
|
69
|
+
*/
|
|
70
|
+
isCurrent(): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Opens an API pipe, waiting for scheduled server restarts to complete.
|
|
73
|
+
* Handles remain usable after restarts of the same installation. If a different
|
|
74
|
+
* installation is selected, use the SDK from the latest initialization event.
|
|
75
|
+
*/
|
|
40
76
|
initializeAPIConnection(pipe?: string): Promise<string>;
|
|
77
|
+
}
|
|
78
|
+
export interface ExtensionAPI {
|
|
79
|
+
/**
|
|
80
|
+
* Fires after each language server initialization. Existing API connections
|
|
81
|
+
* should be discarded and recreated when this fires. Newly registered listeners
|
|
82
|
+
* are invoked immediately if the server is already initialized.
|
|
83
|
+
*/
|
|
84
|
+
onLanguageServerInitialized: Event<TypeScriptSDK>;
|
|
41
85
|
registerContentMappers(contributorId: string, contributions: readonly ContentMapperContribution[]): Disposable;
|
|
42
86
|
/**
|
|
43
87
|
* Changes an LSP language-feature response before conversion to VS Code objects.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensionApi.d.ts","sourceRoot":"","sources":["../../src/vscode/extensionApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,mBAAmB,yBAAyB,CAAC;AAE7C,MAAM,WAAW,UAAU;IACvB,OAAO,IAAI,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,KAAK,CAAC,CAAC;IACpB,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,UAAU,EAAE,GAAG,SAAS,GAAG,UAAU,CAAC;CAC7G;AAED,+DAA+D;AAC/D,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,qBAAqB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,GAAG,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IACzD,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAChD;AAED,MAAM,WAAW,yBAAyB;IACtC,QAAQ,CAAC,UAAU,EAAE,SAAS,MA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C,CAAC;IACzD,wBAAwB,EAAE,cAAc,mBAAmB,CAAC,CAAC;IAC7D,wBAAwB,EAAE,cAAc,mBAAmB,CAAC,CAAC;IAC7D,sBAAsB,EAAE,cAAc,iBAAiB,CAAC,CAAC;IACzD,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAc,SAAQ,sBAAsB;IACzD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,sGAAsG;IACtG,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7C;;;;;OAKG;IACH,SAAS,IAAI,OAAO,CAAC;IACrB;;;;OAIG;IACH,uBAAuB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC3D;AAED,MAAM,WAAW,YAAY;IACzB;;;;OAIG;IACH,2BAA2B,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAClD,sBAAsB,CAAC,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,yBAAyB,EAAE,GAAG,UAAU,CAAC;IAE/G;;;;;;;;;;;OAWG;IACH,qBAAqB,CAAC,CAAC,SAAS,mBAAmB,EAC/C,MAAM,EAAE,CAAC,EACT,WAAW,EAAE,wBAAwB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAClD,UAAU,CAAC;CACjB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export { createTypeScriptModuleLoader } from "./moduleLoader.js";
|
|
2
2
|
//# sourceMappingURL=extensionApi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensionApi.js","sourceRoot":"","sources":["../../src/vscode/extensionApi.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"extensionApi.js","sourceRoot":"","sources":["../../src/vscode/extensionApi.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,4BAA4B,EAA+B,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { APIModules } from "./extensionApi.ts";
|
|
2
|
+
export interface TypeScriptModuleLoader {
|
|
3
|
+
/**
|
|
4
|
+
* Imports a module from the selected API package using the full package specifier.
|
|
5
|
+
*/
|
|
6
|
+
importModule<K extends string>(exportPath: K): Promise<APIModules[K]>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Loads the selected installation's API modules in this process.
|
|
10
|
+
* Pass the SDK's packageJsonPath through your server's initialization options.
|
|
11
|
+
* Restart this process after an in-place package upgrade to clear its module cache.
|
|
12
|
+
*/
|
|
13
|
+
export declare function createTypeScriptModuleLoader(packageJsonPath: string): TypeScriptModuleLoader;
|
|
14
|
+
//# sourceMappingURL=moduleLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moduleLoader.d.ts","sourceRoot":"","sources":["../../src/vscode/moduleLoader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,WAAW,sBAAsB;IACnC;;OAEG;IACH,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,UAAU,EAAE,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;CACzE;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,eAAe,EAAE,MAAM,GAAG,sBAAsB,CAuB5F"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
2
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
3
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
4
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
return path;
|
|
8
|
+
};
|
|
9
|
+
import fs from "node:fs/promises";
|
|
10
|
+
import { createRequire } from "node:module";
|
|
11
|
+
import { pathToFileURL } from "node:url";
|
|
12
|
+
/**
|
|
13
|
+
* Loads the selected installation's API modules in this process.
|
|
14
|
+
* Pass the SDK's packageJsonPath through your server's initialization options.
|
|
15
|
+
* Restart this process after an in-place package upgrade to clear its module cache.
|
|
16
|
+
*/
|
|
17
|
+
export function createTypeScriptModuleLoader(packageJsonPath) {
|
|
18
|
+
async function importModule(exportPath) {
|
|
19
|
+
if (!exportPath.startsWith("typescript/")
|
|
20
|
+
|| exportPath.length === "typescript/".length
|
|
21
|
+
|| exportPath.includes("\\")
|
|
22
|
+
|| exportPath.split("/").includes("..")) {
|
|
23
|
+
throw new Error(`Invalid TypeScript API module export path '${exportPath}'.`);
|
|
24
|
+
}
|
|
25
|
+
const manifestPath = await fs.realpath(packageJsonPath);
|
|
26
|
+
const manifest = JSON.parse(await fs.readFile(manifestPath, "utf8"));
|
|
27
|
+
if (!manifest || typeof manifest !== "object" || !("name" in manifest) || typeof manifest.name !== "string") {
|
|
28
|
+
throw new Error(`TypeScript API package manifest at '${packageJsonPath}' does not contain a package name.`);
|
|
29
|
+
}
|
|
30
|
+
const require = createRequire(manifestPath);
|
|
31
|
+
const modulePath = require.resolve(`${manifest.name}/${exportPath.slice("typescript/".length)}`);
|
|
32
|
+
return import(__rewriteRelativeImportExtension(pathToFileURL(modulePath).href));
|
|
33
|
+
}
|
|
34
|
+
return { importModule };
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=moduleLoader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moduleLoader.js","sourceRoot":"","sources":["../../src/vscode/moduleLoader.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAA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B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "typescript",
|
|
3
|
-
"version": "7.1.0-dev.
|
|
3
|
+
"version": "7.1.0-dev.20261009.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"author": "Microsoft Corp.",
|
|
6
6
|
"homepage": "https://www.typescriptlang.org/",
|
|
@@ -40,21 +40,19 @@
|
|
|
40
40
|
"./schemas/tsconfig.schema.json": "./schemas/tsconfig.schema.json",
|
|
41
41
|
"./schemas/jsconfig.schema.json": "./schemas/jsconfig.schema.json",
|
|
42
42
|
".": "./lib/version.cjs",
|
|
43
|
-
"./
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"./
|
|
47
|
-
"./
|
|
48
|
-
"./
|
|
49
|
-
"./
|
|
50
|
-
"./
|
|
51
|
-
"./
|
|
52
|
-
"./
|
|
53
|
-
"./
|
|
54
|
-
"./
|
|
55
|
-
"./
|
|
56
|
-
"./unstable/ast/visitor": "./dist/ast/visitor.js",
|
|
57
|
-
"./unstable/ast/clone": "./dist/ast/clone.js"
|
|
43
|
+
"./vscode": "./dist/vscode/extensionApi.js",
|
|
44
|
+
"./sync": "./dist/api/sync/api.js",
|
|
45
|
+
"./async": "./dist/api/async/api.js",
|
|
46
|
+
"./fs": "./dist/api/fs.js",
|
|
47
|
+
"./path": "./dist/api/typedPaths.js",
|
|
48
|
+
"./proto": "./dist/api/proto.js",
|
|
49
|
+
"./ast": "./dist/ast/index.js",
|
|
50
|
+
"./ast/is": "./dist/ast/is.js",
|
|
51
|
+
"./ast/factory": "./dist/ast/factory.generated.js",
|
|
52
|
+
"./ast/utils": "./dist/ast/utils.js",
|
|
53
|
+
"./ast/scanner": "./dist/ast/scanner.js",
|
|
54
|
+
"./ast/visitor": "./dist/ast/visitor.js",
|
|
55
|
+
"./ast/clone": "./dist/ast/clone.js"
|
|
58
56
|
},
|
|
59
57
|
"imports": {
|
|
60
58
|
"#getExePath": "./lib/getExePath.js",
|
|
@@ -64,18 +62,18 @@
|
|
|
64
62
|
},
|
|
65
63
|
"#vscode-jsonrpc/node": "./vendor/vscode-jsonrpc/lib/node/main.js"
|
|
66
64
|
},
|
|
67
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "6ad8c56f9b5a9bb910046c56059296311adc24ba",
|
|
68
66
|
"publishConfig": {
|
|
69
67
|
"access": "public",
|
|
70
68
|
"tag": "next"
|
|
71
69
|
},
|
|
72
70
|
"optionalDependencies": {
|
|
73
|
-
"@typescript/typescript-win32-x64": "7.1.0-dev.
|
|
74
|
-
"@typescript/typescript-win32-arm64": "7.1.0-dev.
|
|
75
|
-
"@typescript/typescript-linux-x64": "7.1.0-dev.
|
|
76
|
-
"@typescript/typescript-linux-arm": "7.1.0-dev.
|
|
77
|
-
"@typescript/typescript-linux-arm64": "7.1.0-dev.
|
|
78
|
-
"@typescript/typescript-darwin-x64": "7.1.0-dev.
|
|
79
|
-
"@typescript/typescript-darwin-arm64": "7.1.0-dev.
|
|
71
|
+
"@typescript/typescript-win32-x64": "7.1.0-dev.20261009.1",
|
|
72
|
+
"@typescript/typescript-win32-arm64": "7.1.0-dev.20261009.1",
|
|
73
|
+
"@typescript/typescript-linux-x64": "7.1.0-dev.20261009.1",
|
|
74
|
+
"@typescript/typescript-linux-arm": "7.1.0-dev.20261009.1",
|
|
75
|
+
"@typescript/typescript-linux-arm64": "7.1.0-dev.20261009.1",
|
|
76
|
+
"@typescript/typescript-darwin-x64": "7.1.0-dev.20261009.1",
|
|
77
|
+
"@typescript/typescript-darwin-arm64": "7.1.0-dev.20261009.1"
|
|
80
78
|
}
|
|
81
79
|
}
|