@typescript-deploys/pr-build 5.2.0-pr-54922-6 → 5.2.0-pr-54935-7
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/lib/tsc.js +49 -15
- package/lib/tsserver.js +58 -19
- package/lib/tsserverlibrary.d.ts +5 -1
- package/lib/tsserverlibrary.js +58 -19
- package/lib/typescript.d.ts +5 -1
- package/lib/typescript.js +58 -19
- package/lib/typingsInstaller.js +1 -1
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "5.2";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20230709`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -48184,7 +48184,7 @@ function createTypeChecker(host) {
|
|
|
48184
48184
|
return !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */) && (contains(context.reverseMappedStack, propertySymbol) || ((_a = context.reverseMappedStack) == null ? void 0 : _a[0]) && !(getObjectFlags(last(context.reverseMappedStack).links.propertyType) & 16 /* Anonymous */));
|
|
48185
48185
|
}
|
|
48186
48186
|
function addPropertyToElementList(propertySymbol, context, typeElements) {
|
|
48187
|
-
var _a;
|
|
48187
|
+
var _a, _b;
|
|
48188
48188
|
const propertyIsReverseMapped = !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */);
|
|
48189
48189
|
const propertyType = shouldUsePlaceholderForProperty(propertySymbol, context) ? anyType : getNonMissingTypeOfSymbol(propertySymbol);
|
|
48190
48190
|
const saveEnclosingDeclaration = context.enclosingDeclaration;
|
|
@@ -48234,17 +48234,54 @@ function createTypeChecker(host) {
|
|
|
48234
48234
|
context.reverseMappedStack.pop();
|
|
48235
48235
|
}
|
|
48236
48236
|
}
|
|
48237
|
-
|
|
48238
|
-
|
|
48239
|
-
|
|
48237
|
+
if (propertySymbol.flags & 98304 /* Accessor */) {
|
|
48238
|
+
const modifierFlags = getDeclarationModifierFlagsFromSymbol(propertySymbol);
|
|
48239
|
+
const flags = modifierFlags & ~(512 /* Async */ | 32 /* Static */ | 128 /* Accessor */);
|
|
48240
|
+
if (propertySymbol.flags & 32768 /* GetAccessor */) {
|
|
48241
|
+
const getAccessorSignature = factory.createGetAccessorDeclaration(
|
|
48242
|
+
factory.createModifiersFromModifierFlags(flags),
|
|
48243
|
+
propertyName,
|
|
48244
|
+
[],
|
|
48245
|
+
propertyTypeNode,
|
|
48246
|
+
/*body*/
|
|
48247
|
+
void 0
|
|
48248
|
+
);
|
|
48249
|
+
typeElements.push(preserveCommentsOn(getAccessorSignature));
|
|
48250
|
+
}
|
|
48251
|
+
if (propertySymbol.flags & 65536 /* SetAccessor */) {
|
|
48252
|
+
const setAccessorDecl = find(propertySymbol.declarations, (decl) => decl.kind === 178 /* SetAccessor */);
|
|
48253
|
+
const parameterName = ((_b = setAccessorDecl == null ? void 0 : setAccessorDecl.parameters) == null ? void 0 : _b.length) > 0 ? setAccessorDecl.parameters[0].name : "arg";
|
|
48254
|
+
const setAccessorSignature = factory.createSetAccessorDeclaration(
|
|
48255
|
+
factory.createModifiersFromModifierFlags(flags),
|
|
48256
|
+
propertyName,
|
|
48257
|
+
[factory.createParameterDeclaration(
|
|
48258
|
+
/*modifiers*/
|
|
48259
|
+
void 0,
|
|
48260
|
+
/*dotDotDotToken*/
|
|
48261
|
+
void 0,
|
|
48262
|
+
parameterName,
|
|
48263
|
+
/*questionToken*/
|
|
48264
|
+
void 0,
|
|
48265
|
+
propertyTypeNode
|
|
48266
|
+
)],
|
|
48267
|
+
/*body*/
|
|
48268
|
+
void 0
|
|
48269
|
+
);
|
|
48270
|
+
typeElements.push(preserveCommentsOn(setAccessorSignature));
|
|
48271
|
+
}
|
|
48272
|
+
} else {
|
|
48273
|
+
const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0;
|
|
48274
|
+
if (modifiers) {
|
|
48275
|
+
context.approximateLength += 9;
|
|
48276
|
+
}
|
|
48277
|
+
const propertySignature = factory.createPropertySignature(
|
|
48278
|
+
modifiers,
|
|
48279
|
+
propertyName,
|
|
48280
|
+
optionalToken,
|
|
48281
|
+
propertyTypeNode
|
|
48282
|
+
);
|
|
48283
|
+
typeElements.push(preserveCommentsOn(propertySignature));
|
|
48240
48284
|
}
|
|
48241
|
-
const propertySignature = factory.createPropertySignature(
|
|
48242
|
-
modifiers,
|
|
48243
|
-
propertyName,
|
|
48244
|
-
optionalToken,
|
|
48245
|
-
propertyTypeNode
|
|
48246
|
-
);
|
|
48247
|
-
typeElements.push(preserveCommentsOn(propertySignature));
|
|
48248
48285
|
function preserveCommentsOn(node) {
|
|
48249
48286
|
var _a2;
|
|
48250
48287
|
if (some(propertySymbol.declarations, (d) => d.kind === 355 /* JSDocPropertyTag */)) {
|
|
@@ -118420,9 +118457,6 @@ function parseConfigHostFromCompilerHostLike(host, directoryStructureHost = host
|
|
|
118420
118457
|
return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth);
|
|
118421
118458
|
},
|
|
118422
118459
|
readFile: (f) => directoryStructureHost.readFile(f),
|
|
118423
|
-
directoryExists: maybeBind(directoryStructureHost, directoryStructureHost.directoryExists),
|
|
118424
|
-
getDirectories: maybeBind(directoryStructureHost, directoryStructureHost.getDirectories),
|
|
118425
|
-
realpath: maybeBind(directoryStructureHost, directoryStructureHost.realpath),
|
|
118426
118460
|
useCaseSensitiveFileNames: host.useCaseSensitiveFileNames(),
|
|
118427
118461
|
getCurrentDirectory: () => host.getCurrentDirectory(),
|
|
118428
118462
|
onUnRecoverableConfigFileDiagnostic: host.onUnRecoverableConfigFileDiagnostic || returnUndefined,
|
package/lib/tsserver.js
CHANGED
|
@@ -2327,7 +2327,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2327
2327
|
|
|
2328
2328
|
// src/compiler/corePublic.ts
|
|
2329
2329
|
var versionMajorMinor = "5.2";
|
|
2330
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2330
|
+
var version = `${versionMajorMinor}.0-insiders.20230709`;
|
|
2331
2331
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2332
2332
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2333
2333
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -52891,7 +52891,7 @@ function createTypeChecker(host) {
|
|
|
52891
52891
|
return !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */) && (contains(context.reverseMappedStack, propertySymbol) || ((_a = context.reverseMappedStack) == null ? void 0 : _a[0]) && !(getObjectFlags(last(context.reverseMappedStack).links.propertyType) & 16 /* Anonymous */));
|
|
52892
52892
|
}
|
|
52893
52893
|
function addPropertyToElementList(propertySymbol, context, typeElements) {
|
|
52894
|
-
var _a;
|
|
52894
|
+
var _a, _b;
|
|
52895
52895
|
const propertyIsReverseMapped = !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */);
|
|
52896
52896
|
const propertyType = shouldUsePlaceholderForProperty(propertySymbol, context) ? anyType : getNonMissingTypeOfSymbol(propertySymbol);
|
|
52897
52897
|
const saveEnclosingDeclaration = context.enclosingDeclaration;
|
|
@@ -52941,17 +52941,54 @@ function createTypeChecker(host) {
|
|
|
52941
52941
|
context.reverseMappedStack.pop();
|
|
52942
52942
|
}
|
|
52943
52943
|
}
|
|
52944
|
-
|
|
52945
|
-
|
|
52946
|
-
|
|
52944
|
+
if (propertySymbol.flags & 98304 /* Accessor */) {
|
|
52945
|
+
const modifierFlags = getDeclarationModifierFlagsFromSymbol(propertySymbol);
|
|
52946
|
+
const flags = modifierFlags & ~(512 /* Async */ | 32 /* Static */ | 128 /* Accessor */);
|
|
52947
|
+
if (propertySymbol.flags & 32768 /* GetAccessor */) {
|
|
52948
|
+
const getAccessorSignature = factory.createGetAccessorDeclaration(
|
|
52949
|
+
factory.createModifiersFromModifierFlags(flags),
|
|
52950
|
+
propertyName,
|
|
52951
|
+
[],
|
|
52952
|
+
propertyTypeNode,
|
|
52953
|
+
/*body*/
|
|
52954
|
+
void 0
|
|
52955
|
+
);
|
|
52956
|
+
typeElements.push(preserveCommentsOn(getAccessorSignature));
|
|
52957
|
+
}
|
|
52958
|
+
if (propertySymbol.flags & 65536 /* SetAccessor */) {
|
|
52959
|
+
const setAccessorDecl = find(propertySymbol.declarations, (decl) => decl.kind === 178 /* SetAccessor */);
|
|
52960
|
+
const parameterName = ((_b = setAccessorDecl == null ? void 0 : setAccessorDecl.parameters) == null ? void 0 : _b.length) > 0 ? setAccessorDecl.parameters[0].name : "arg";
|
|
52961
|
+
const setAccessorSignature = factory.createSetAccessorDeclaration(
|
|
52962
|
+
factory.createModifiersFromModifierFlags(flags),
|
|
52963
|
+
propertyName,
|
|
52964
|
+
[factory.createParameterDeclaration(
|
|
52965
|
+
/*modifiers*/
|
|
52966
|
+
void 0,
|
|
52967
|
+
/*dotDotDotToken*/
|
|
52968
|
+
void 0,
|
|
52969
|
+
parameterName,
|
|
52970
|
+
/*questionToken*/
|
|
52971
|
+
void 0,
|
|
52972
|
+
propertyTypeNode
|
|
52973
|
+
)],
|
|
52974
|
+
/*body*/
|
|
52975
|
+
void 0
|
|
52976
|
+
);
|
|
52977
|
+
typeElements.push(preserveCommentsOn(setAccessorSignature));
|
|
52978
|
+
}
|
|
52979
|
+
} else {
|
|
52980
|
+
const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0;
|
|
52981
|
+
if (modifiers) {
|
|
52982
|
+
context.approximateLength += 9;
|
|
52983
|
+
}
|
|
52984
|
+
const propertySignature = factory.createPropertySignature(
|
|
52985
|
+
modifiers,
|
|
52986
|
+
propertyName,
|
|
52987
|
+
optionalToken,
|
|
52988
|
+
propertyTypeNode
|
|
52989
|
+
);
|
|
52990
|
+
typeElements.push(preserveCommentsOn(propertySignature));
|
|
52947
52991
|
}
|
|
52948
|
-
const propertySignature = factory.createPropertySignature(
|
|
52949
|
-
modifiers,
|
|
52950
|
-
propertyName,
|
|
52951
|
-
optionalToken,
|
|
52952
|
-
propertyTypeNode
|
|
52953
|
-
);
|
|
52954
|
-
typeElements.push(preserveCommentsOn(propertySignature));
|
|
52955
52992
|
function preserveCommentsOn(node) {
|
|
52956
52993
|
var _a2;
|
|
52957
52994
|
if (some(propertySymbol.declarations, (d) => d.kind === 355 /* JSDocPropertyTag */)) {
|
|
@@ -123363,9 +123400,6 @@ function parseConfigHostFromCompilerHostLike(host, directoryStructureHost = host
|
|
|
123363
123400
|
return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth);
|
|
123364
123401
|
},
|
|
123365
123402
|
readFile: (f) => directoryStructureHost.readFile(f),
|
|
123366
|
-
directoryExists: maybeBind(directoryStructureHost, directoryStructureHost.directoryExists),
|
|
123367
|
-
getDirectories: maybeBind(directoryStructureHost, directoryStructureHost.getDirectories),
|
|
123368
|
-
realpath: maybeBind(directoryStructureHost, directoryStructureHost.realpath),
|
|
123369
123403
|
useCaseSensitiveFileNames: host.useCaseSensitiveFileNames(),
|
|
123370
123404
|
getCurrentDirectory: () => host.getCurrentDirectory(),
|
|
123371
123405
|
onUnRecoverableConfigFileDiagnostic: host.onUnRecoverableConfigFileDiagnostic || returnUndefined,
|
|
@@ -130133,6 +130167,8 @@ var ScriptElementKind = /* @__PURE__ */ ((ScriptElementKind2) => {
|
|
|
130133
130167
|
ScriptElementKind2["enumMemberElement"] = "enum member";
|
|
130134
130168
|
ScriptElementKind2["variableElement"] = "var";
|
|
130135
130169
|
ScriptElementKind2["localVariableElement"] = "local var";
|
|
130170
|
+
ScriptElementKind2["variableUsingElement"] = "using";
|
|
130171
|
+
ScriptElementKind2["variableAwaitUsingElement"] = "await using";
|
|
130136
130172
|
ScriptElementKind2["functionElement"] = "function";
|
|
130137
130173
|
ScriptElementKind2["localFunctionElement"] = "local function";
|
|
130138
130174
|
ScriptElementKind2["memberFunctionElement"] = "method";
|
|
@@ -143743,9 +143779,6 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
|
|
|
143743
143779
|
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
143744
143780
|
fileExists: (fileName) => compilerHost.fileExists(fileName),
|
|
143745
143781
|
readFile: (fileName) => compilerHost.readFile(fileName),
|
|
143746
|
-
directoryExists: (f) => compilerHost.directoryExists(f),
|
|
143747
|
-
getDirectories: (f) => compilerHost.getDirectories(f),
|
|
143748
|
-
realpath: compilerHost.realpath,
|
|
143749
143782
|
readDirectory: (...args) => compilerHost.readDirectory(...args),
|
|
143750
143783
|
trace: compilerHost.trace,
|
|
143751
143784
|
getCurrentDirectory: compilerHost.getCurrentDirectory,
|
|
@@ -167126,6 +167159,10 @@ function getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeCheck
|
|
|
167126
167159
|
return "parameter" /* parameterElement */;
|
|
167127
167160
|
} else if (symbol.valueDeclaration && isVarConst(symbol.valueDeclaration)) {
|
|
167128
167161
|
return "const" /* constElement */;
|
|
167162
|
+
} else if (symbol.valueDeclaration && isVarUsing(symbol.valueDeclaration)) {
|
|
167163
|
+
return "using" /* variableUsingElement */;
|
|
167164
|
+
} else if (symbol.valueDeclaration && isVarAwaitUsing(symbol.valueDeclaration)) {
|
|
167165
|
+
return "await using" /* variableAwaitUsingElement */;
|
|
167129
167166
|
} else if (forEach(symbol.declarations, isLet)) {
|
|
167130
167167
|
return "let" /* letElement */;
|
|
167131
167168
|
}
|
|
@@ -167519,7 +167556,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so
|
|
|
167519
167556
|
} else {
|
|
167520
167557
|
addPrefixForAnyFunctionOrVar(symbol, symbolKind);
|
|
167521
167558
|
}
|
|
167522
|
-
if (symbolKind === "property" /* memberVariableElement */ || symbolKind === "accessor" /* memberAccessorVariableElement */ || symbolKind === "getter" /* memberGetAccessorElement */ || symbolKind === "setter" /* memberSetAccessorElement */ || symbolKind === "JSX attribute" /* jsxAttribute */ || symbolFlags & 3 /* Variable */ || symbolKind === "local var" /* localVariableElement */ || symbolKind === "index" /* indexSignatureElement */ || isThisExpression) {
|
|
167559
|
+
if (symbolKind === "property" /* memberVariableElement */ || symbolKind === "accessor" /* memberAccessorVariableElement */ || symbolKind === "getter" /* memberGetAccessorElement */ || symbolKind === "setter" /* memberSetAccessorElement */ || symbolKind === "JSX attribute" /* jsxAttribute */ || symbolFlags & 3 /* Variable */ || symbolKind === "local var" /* localVariableElement */ || symbolKind === "index" /* indexSignatureElement */ || symbolKind === "using" /* variableUsingElement */ || symbolKind === "await using" /* variableAwaitUsingElement */ || isThisExpression) {
|
|
167523
167560
|
displayParts.push(punctuationPart(59 /* ColonToken */));
|
|
167524
167561
|
displayParts.push(spacePart());
|
|
167525
167562
|
if (type.symbol && type.symbol.flags & 262144 /* TypeParameter */ && symbolKind !== "index" /* indexSignatureElement */) {
|
|
@@ -167669,6 +167706,8 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so
|
|
|
167669
167706
|
case "let" /* letElement */:
|
|
167670
167707
|
case "const" /* constElement */:
|
|
167671
167708
|
case "constructor" /* constructorImplementationElement */:
|
|
167709
|
+
case "using" /* variableUsingElement */:
|
|
167710
|
+
case "await using" /* variableAwaitUsingElement */:
|
|
167672
167711
|
displayParts.push(textOrKeywordPart(symbolKind2));
|
|
167673
167712
|
return;
|
|
167674
167713
|
default:
|
package/lib/tsserverlibrary.d.ts
CHANGED
|
@@ -6274,7 +6274,7 @@ declare namespace ts {
|
|
|
6274
6274
|
getSourceFileByPath(path: Path): SourceFile | undefined;
|
|
6275
6275
|
getCurrentDirectory(): string;
|
|
6276
6276
|
}
|
|
6277
|
-
interface ParseConfigHost
|
|
6277
|
+
interface ParseConfigHost {
|
|
6278
6278
|
useCaseSensitiveFileNames: boolean;
|
|
6279
6279
|
readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[];
|
|
6280
6280
|
/**
|
|
@@ -10978,6 +10978,10 @@ declare namespace ts {
|
|
|
10978
10978
|
variableElement = "var",
|
|
10979
10979
|
/** Inside function */
|
|
10980
10980
|
localVariableElement = "local var",
|
|
10981
|
+
/** using foo = ... */
|
|
10982
|
+
variableUsingElement = "using",
|
|
10983
|
+
/** await using foo = ... */
|
|
10984
|
+
variableAwaitUsingElement = "await using",
|
|
10981
10985
|
/**
|
|
10982
10986
|
* Inside module and script only
|
|
10983
10987
|
* function f() { }
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.2";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230709`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -50658,7 +50658,7 @@ ${lanes.join("\n")}
|
|
|
50658
50658
|
return !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */) && (contains(context.reverseMappedStack, propertySymbol) || ((_a = context.reverseMappedStack) == null ? void 0 : _a[0]) && !(getObjectFlags(last(context.reverseMappedStack).links.propertyType) & 16 /* Anonymous */));
|
|
50659
50659
|
}
|
|
50660
50660
|
function addPropertyToElementList(propertySymbol, context, typeElements) {
|
|
50661
|
-
var _a;
|
|
50661
|
+
var _a, _b;
|
|
50662
50662
|
const propertyIsReverseMapped = !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */);
|
|
50663
50663
|
const propertyType = shouldUsePlaceholderForProperty(propertySymbol, context) ? anyType : getNonMissingTypeOfSymbol(propertySymbol);
|
|
50664
50664
|
const saveEnclosingDeclaration = context.enclosingDeclaration;
|
|
@@ -50708,17 +50708,54 @@ ${lanes.join("\n")}
|
|
|
50708
50708
|
context.reverseMappedStack.pop();
|
|
50709
50709
|
}
|
|
50710
50710
|
}
|
|
50711
|
-
|
|
50712
|
-
|
|
50713
|
-
|
|
50711
|
+
if (propertySymbol.flags & 98304 /* Accessor */) {
|
|
50712
|
+
const modifierFlags = getDeclarationModifierFlagsFromSymbol(propertySymbol);
|
|
50713
|
+
const flags = modifierFlags & ~(512 /* Async */ | 32 /* Static */ | 128 /* Accessor */);
|
|
50714
|
+
if (propertySymbol.flags & 32768 /* GetAccessor */) {
|
|
50715
|
+
const getAccessorSignature = factory.createGetAccessorDeclaration(
|
|
50716
|
+
factory.createModifiersFromModifierFlags(flags),
|
|
50717
|
+
propertyName,
|
|
50718
|
+
[],
|
|
50719
|
+
propertyTypeNode,
|
|
50720
|
+
/*body*/
|
|
50721
|
+
void 0
|
|
50722
|
+
);
|
|
50723
|
+
typeElements.push(preserveCommentsOn(getAccessorSignature));
|
|
50724
|
+
}
|
|
50725
|
+
if (propertySymbol.flags & 65536 /* SetAccessor */) {
|
|
50726
|
+
const setAccessorDecl = find(propertySymbol.declarations, (decl) => decl.kind === 178 /* SetAccessor */);
|
|
50727
|
+
const parameterName = ((_b = setAccessorDecl == null ? void 0 : setAccessorDecl.parameters) == null ? void 0 : _b.length) > 0 ? setAccessorDecl.parameters[0].name : "arg";
|
|
50728
|
+
const setAccessorSignature = factory.createSetAccessorDeclaration(
|
|
50729
|
+
factory.createModifiersFromModifierFlags(flags),
|
|
50730
|
+
propertyName,
|
|
50731
|
+
[factory.createParameterDeclaration(
|
|
50732
|
+
/*modifiers*/
|
|
50733
|
+
void 0,
|
|
50734
|
+
/*dotDotDotToken*/
|
|
50735
|
+
void 0,
|
|
50736
|
+
parameterName,
|
|
50737
|
+
/*questionToken*/
|
|
50738
|
+
void 0,
|
|
50739
|
+
propertyTypeNode
|
|
50740
|
+
)],
|
|
50741
|
+
/*body*/
|
|
50742
|
+
void 0
|
|
50743
|
+
);
|
|
50744
|
+
typeElements.push(preserveCommentsOn(setAccessorSignature));
|
|
50745
|
+
}
|
|
50746
|
+
} else {
|
|
50747
|
+
const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0;
|
|
50748
|
+
if (modifiers) {
|
|
50749
|
+
context.approximateLength += 9;
|
|
50750
|
+
}
|
|
50751
|
+
const propertySignature = factory.createPropertySignature(
|
|
50752
|
+
modifiers,
|
|
50753
|
+
propertyName,
|
|
50754
|
+
optionalToken,
|
|
50755
|
+
propertyTypeNode
|
|
50756
|
+
);
|
|
50757
|
+
typeElements.push(preserveCommentsOn(propertySignature));
|
|
50714
50758
|
}
|
|
50715
|
-
const propertySignature = factory.createPropertySignature(
|
|
50716
|
-
modifiers,
|
|
50717
|
-
propertyName,
|
|
50718
|
-
optionalToken,
|
|
50719
|
-
propertyTypeNode
|
|
50720
|
-
);
|
|
50721
|
-
typeElements.push(preserveCommentsOn(propertySignature));
|
|
50722
50759
|
function preserveCommentsOn(node) {
|
|
50723
50760
|
var _a2;
|
|
50724
50761
|
if (some(propertySymbol.declarations, (d) => d.kind === 355 /* JSDocPropertyTag */)) {
|
|
@@ -121348,9 +121385,6 @@ ${lanes.join("\n")}
|
|
|
121348
121385
|
return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth);
|
|
121349
121386
|
},
|
|
121350
121387
|
readFile: (f) => directoryStructureHost.readFile(f),
|
|
121351
|
-
directoryExists: maybeBind(directoryStructureHost, directoryStructureHost.directoryExists),
|
|
121352
|
-
getDirectories: maybeBind(directoryStructureHost, directoryStructureHost.getDirectories),
|
|
121353
|
-
realpath: maybeBind(directoryStructureHost, directoryStructureHost.realpath),
|
|
121354
121388
|
useCaseSensitiveFileNames: host.useCaseSensitiveFileNames(),
|
|
121355
121389
|
getCurrentDirectory: () => host.getCurrentDirectory(),
|
|
121356
121390
|
onUnRecoverableConfigFileDiagnostic: host.onUnRecoverableConfigFileDiagnostic || returnUndefined,
|
|
@@ -128439,6 +128473,8 @@ ${lanes.join("\n")}
|
|
|
128439
128473
|
ScriptElementKind2["enumMemberElement"] = "enum member";
|
|
128440
128474
|
ScriptElementKind2["variableElement"] = "var";
|
|
128441
128475
|
ScriptElementKind2["localVariableElement"] = "local var";
|
|
128476
|
+
ScriptElementKind2["variableUsingElement"] = "using";
|
|
128477
|
+
ScriptElementKind2["variableAwaitUsingElement"] = "await using";
|
|
128442
128478
|
ScriptElementKind2["functionElement"] = "function";
|
|
128443
128479
|
ScriptElementKind2["localFunctionElement"] = "local function";
|
|
128444
128480
|
ScriptElementKind2["memberFunctionElement"] = "method";
|
|
@@ -141688,9 +141724,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
141688
141724
|
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
141689
141725
|
fileExists: (fileName) => compilerHost.fileExists(fileName),
|
|
141690
141726
|
readFile: (fileName) => compilerHost.readFile(fileName),
|
|
141691
|
-
directoryExists: (f) => compilerHost.directoryExists(f),
|
|
141692
|
-
getDirectories: (f) => compilerHost.getDirectories(f),
|
|
141693
|
-
realpath: compilerHost.realpath,
|
|
141694
141727
|
readDirectory: (...args) => compilerHost.readDirectory(...args),
|
|
141695
141728
|
trace: compilerHost.trace,
|
|
141696
141729
|
getCurrentDirectory: compilerHost.getCurrentDirectory,
|
|
@@ -166567,6 +166600,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
166567
166600
|
return "parameter" /* parameterElement */;
|
|
166568
166601
|
} else if (symbol.valueDeclaration && isVarConst(symbol.valueDeclaration)) {
|
|
166569
166602
|
return "const" /* constElement */;
|
|
166603
|
+
} else if (symbol.valueDeclaration && isVarUsing(symbol.valueDeclaration)) {
|
|
166604
|
+
return "using" /* variableUsingElement */;
|
|
166605
|
+
} else if (symbol.valueDeclaration && isVarAwaitUsing(symbol.valueDeclaration)) {
|
|
166606
|
+
return "await using" /* variableAwaitUsingElement */;
|
|
166570
166607
|
} else if (forEach(symbol.declarations, isLet)) {
|
|
166571
166608
|
return "let" /* letElement */;
|
|
166572
166609
|
}
|
|
@@ -166960,7 +166997,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
166960
166997
|
} else {
|
|
166961
166998
|
addPrefixForAnyFunctionOrVar(symbol, symbolKind);
|
|
166962
166999
|
}
|
|
166963
|
-
if (symbolKind === "property" /* memberVariableElement */ || symbolKind === "accessor" /* memberAccessorVariableElement */ || symbolKind === "getter" /* memberGetAccessorElement */ || symbolKind === "setter" /* memberSetAccessorElement */ || symbolKind === "JSX attribute" /* jsxAttribute */ || symbolFlags & 3 /* Variable */ || symbolKind === "local var" /* localVariableElement */ || symbolKind === "index" /* indexSignatureElement */ || isThisExpression) {
|
|
167000
|
+
if (symbolKind === "property" /* memberVariableElement */ || symbolKind === "accessor" /* memberAccessorVariableElement */ || symbolKind === "getter" /* memberGetAccessorElement */ || symbolKind === "setter" /* memberSetAccessorElement */ || symbolKind === "JSX attribute" /* jsxAttribute */ || symbolFlags & 3 /* Variable */ || symbolKind === "local var" /* localVariableElement */ || symbolKind === "index" /* indexSignatureElement */ || symbolKind === "using" /* variableUsingElement */ || symbolKind === "await using" /* variableAwaitUsingElement */ || isThisExpression) {
|
|
166964
167001
|
displayParts.push(punctuationPart(59 /* ColonToken */));
|
|
166965
167002
|
displayParts.push(spacePart());
|
|
166966
167003
|
if (type.symbol && type.symbol.flags & 262144 /* TypeParameter */ && symbolKind !== "index" /* indexSignatureElement */) {
|
|
@@ -167110,6 +167147,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
167110
167147
|
case "let" /* letElement */:
|
|
167111
167148
|
case "const" /* constElement */:
|
|
167112
167149
|
case "constructor" /* constructorImplementationElement */:
|
|
167150
|
+
case "using" /* variableUsingElement */:
|
|
167151
|
+
case "await using" /* variableAwaitUsingElement */:
|
|
167113
167152
|
displayParts.push(textOrKeywordPart(symbolKind2));
|
|
167114
167153
|
return;
|
|
167115
167154
|
default:
|
package/lib/typescript.d.ts
CHANGED
|
@@ -2221,7 +2221,7 @@ declare namespace ts {
|
|
|
2221
2221
|
getSourceFileByPath(path: Path): SourceFile | undefined;
|
|
2222
2222
|
getCurrentDirectory(): string;
|
|
2223
2223
|
}
|
|
2224
|
-
interface ParseConfigHost
|
|
2224
|
+
interface ParseConfigHost {
|
|
2225
2225
|
useCaseSensitiveFileNames: boolean;
|
|
2226
2226
|
readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[];
|
|
2227
2227
|
/**
|
|
@@ -7009,6 +7009,10 @@ declare namespace ts {
|
|
|
7009
7009
|
variableElement = "var",
|
|
7010
7010
|
/** Inside function */
|
|
7011
7011
|
localVariableElement = "local var",
|
|
7012
|
+
/** using foo = ... */
|
|
7013
|
+
variableUsingElement = "using",
|
|
7014
|
+
/** await using foo = ... */
|
|
7015
|
+
variableAwaitUsingElement = "await using",
|
|
7012
7016
|
/**
|
|
7013
7017
|
* Inside module and script only
|
|
7014
7018
|
* function f() { }
|
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.2";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230709`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -50658,7 +50658,7 @@ ${lanes.join("\n")}
|
|
|
50658
50658
|
return !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */) && (contains(context.reverseMappedStack, propertySymbol) || ((_a = context.reverseMappedStack) == null ? void 0 : _a[0]) && !(getObjectFlags(last(context.reverseMappedStack).links.propertyType) & 16 /* Anonymous */));
|
|
50659
50659
|
}
|
|
50660
50660
|
function addPropertyToElementList(propertySymbol, context, typeElements) {
|
|
50661
|
-
var _a;
|
|
50661
|
+
var _a, _b;
|
|
50662
50662
|
const propertyIsReverseMapped = !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */);
|
|
50663
50663
|
const propertyType = shouldUsePlaceholderForProperty(propertySymbol, context) ? anyType : getNonMissingTypeOfSymbol(propertySymbol);
|
|
50664
50664
|
const saveEnclosingDeclaration = context.enclosingDeclaration;
|
|
@@ -50708,17 +50708,54 @@ ${lanes.join("\n")}
|
|
|
50708
50708
|
context.reverseMappedStack.pop();
|
|
50709
50709
|
}
|
|
50710
50710
|
}
|
|
50711
|
-
|
|
50712
|
-
|
|
50713
|
-
|
|
50711
|
+
if (propertySymbol.flags & 98304 /* Accessor */) {
|
|
50712
|
+
const modifierFlags = getDeclarationModifierFlagsFromSymbol(propertySymbol);
|
|
50713
|
+
const flags = modifierFlags & ~(512 /* Async */ | 32 /* Static */ | 128 /* Accessor */);
|
|
50714
|
+
if (propertySymbol.flags & 32768 /* GetAccessor */) {
|
|
50715
|
+
const getAccessorSignature = factory.createGetAccessorDeclaration(
|
|
50716
|
+
factory.createModifiersFromModifierFlags(flags),
|
|
50717
|
+
propertyName,
|
|
50718
|
+
[],
|
|
50719
|
+
propertyTypeNode,
|
|
50720
|
+
/*body*/
|
|
50721
|
+
void 0
|
|
50722
|
+
);
|
|
50723
|
+
typeElements.push(preserveCommentsOn(getAccessorSignature));
|
|
50724
|
+
}
|
|
50725
|
+
if (propertySymbol.flags & 65536 /* SetAccessor */) {
|
|
50726
|
+
const setAccessorDecl = find(propertySymbol.declarations, (decl) => decl.kind === 178 /* SetAccessor */);
|
|
50727
|
+
const parameterName = ((_b = setAccessorDecl == null ? void 0 : setAccessorDecl.parameters) == null ? void 0 : _b.length) > 0 ? setAccessorDecl.parameters[0].name : "arg";
|
|
50728
|
+
const setAccessorSignature = factory.createSetAccessorDeclaration(
|
|
50729
|
+
factory.createModifiersFromModifierFlags(flags),
|
|
50730
|
+
propertyName,
|
|
50731
|
+
[factory.createParameterDeclaration(
|
|
50732
|
+
/*modifiers*/
|
|
50733
|
+
void 0,
|
|
50734
|
+
/*dotDotDotToken*/
|
|
50735
|
+
void 0,
|
|
50736
|
+
parameterName,
|
|
50737
|
+
/*questionToken*/
|
|
50738
|
+
void 0,
|
|
50739
|
+
propertyTypeNode
|
|
50740
|
+
)],
|
|
50741
|
+
/*body*/
|
|
50742
|
+
void 0
|
|
50743
|
+
);
|
|
50744
|
+
typeElements.push(preserveCommentsOn(setAccessorSignature));
|
|
50745
|
+
}
|
|
50746
|
+
} else {
|
|
50747
|
+
const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0;
|
|
50748
|
+
if (modifiers) {
|
|
50749
|
+
context.approximateLength += 9;
|
|
50750
|
+
}
|
|
50751
|
+
const propertySignature = factory.createPropertySignature(
|
|
50752
|
+
modifiers,
|
|
50753
|
+
propertyName,
|
|
50754
|
+
optionalToken,
|
|
50755
|
+
propertyTypeNode
|
|
50756
|
+
);
|
|
50757
|
+
typeElements.push(preserveCommentsOn(propertySignature));
|
|
50714
50758
|
}
|
|
50715
|
-
const propertySignature = factory.createPropertySignature(
|
|
50716
|
-
modifiers,
|
|
50717
|
-
propertyName,
|
|
50718
|
-
optionalToken,
|
|
50719
|
-
propertyTypeNode
|
|
50720
|
-
);
|
|
50721
|
-
typeElements.push(preserveCommentsOn(propertySignature));
|
|
50722
50759
|
function preserveCommentsOn(node) {
|
|
50723
50760
|
var _a2;
|
|
50724
50761
|
if (some(propertySymbol.declarations, (d) => d.kind === 355 /* JSDocPropertyTag */)) {
|
|
@@ -121348,9 +121385,6 @@ ${lanes.join("\n")}
|
|
|
121348
121385
|
return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth);
|
|
121349
121386
|
},
|
|
121350
121387
|
readFile: (f) => directoryStructureHost.readFile(f),
|
|
121351
|
-
directoryExists: maybeBind(directoryStructureHost, directoryStructureHost.directoryExists),
|
|
121352
|
-
getDirectories: maybeBind(directoryStructureHost, directoryStructureHost.getDirectories),
|
|
121353
|
-
realpath: maybeBind(directoryStructureHost, directoryStructureHost.realpath),
|
|
121354
121388
|
useCaseSensitiveFileNames: host.useCaseSensitiveFileNames(),
|
|
121355
121389
|
getCurrentDirectory: () => host.getCurrentDirectory(),
|
|
121356
121390
|
onUnRecoverableConfigFileDiagnostic: host.onUnRecoverableConfigFileDiagnostic || returnUndefined,
|
|
@@ -128454,6 +128488,8 @@ ${lanes.join("\n")}
|
|
|
128454
128488
|
ScriptElementKind2["enumMemberElement"] = "enum member";
|
|
128455
128489
|
ScriptElementKind2["variableElement"] = "var";
|
|
128456
128490
|
ScriptElementKind2["localVariableElement"] = "local var";
|
|
128491
|
+
ScriptElementKind2["variableUsingElement"] = "using";
|
|
128492
|
+
ScriptElementKind2["variableAwaitUsingElement"] = "await using";
|
|
128457
128493
|
ScriptElementKind2["functionElement"] = "function";
|
|
128458
128494
|
ScriptElementKind2["localFunctionElement"] = "local function";
|
|
128459
128495
|
ScriptElementKind2["memberFunctionElement"] = "method";
|
|
@@ -141703,9 +141739,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
141703
141739
|
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
141704
141740
|
fileExists: (fileName) => compilerHost.fileExists(fileName),
|
|
141705
141741
|
readFile: (fileName) => compilerHost.readFile(fileName),
|
|
141706
|
-
directoryExists: (f) => compilerHost.directoryExists(f),
|
|
141707
|
-
getDirectories: (f) => compilerHost.getDirectories(f),
|
|
141708
|
-
realpath: compilerHost.realpath,
|
|
141709
141742
|
readDirectory: (...args) => compilerHost.readDirectory(...args),
|
|
141710
141743
|
trace: compilerHost.trace,
|
|
141711
141744
|
getCurrentDirectory: compilerHost.getCurrentDirectory,
|
|
@@ -166582,6 +166615,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
166582
166615
|
return "parameter" /* parameterElement */;
|
|
166583
166616
|
} else if (symbol.valueDeclaration && isVarConst(symbol.valueDeclaration)) {
|
|
166584
166617
|
return "const" /* constElement */;
|
|
166618
|
+
} else if (symbol.valueDeclaration && isVarUsing(symbol.valueDeclaration)) {
|
|
166619
|
+
return "using" /* variableUsingElement */;
|
|
166620
|
+
} else if (symbol.valueDeclaration && isVarAwaitUsing(symbol.valueDeclaration)) {
|
|
166621
|
+
return "await using" /* variableAwaitUsingElement */;
|
|
166585
166622
|
} else if (forEach(symbol.declarations, isLet)) {
|
|
166586
166623
|
return "let" /* letElement */;
|
|
166587
166624
|
}
|
|
@@ -166975,7 +167012,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
166975
167012
|
} else {
|
|
166976
167013
|
addPrefixForAnyFunctionOrVar(symbol, symbolKind);
|
|
166977
167014
|
}
|
|
166978
|
-
if (symbolKind === "property" /* memberVariableElement */ || symbolKind === "accessor" /* memberAccessorVariableElement */ || symbolKind === "getter" /* memberGetAccessorElement */ || symbolKind === "setter" /* memberSetAccessorElement */ || symbolKind === "JSX attribute" /* jsxAttribute */ || symbolFlags & 3 /* Variable */ || symbolKind === "local var" /* localVariableElement */ || symbolKind === "index" /* indexSignatureElement */ || isThisExpression) {
|
|
167015
|
+
if (symbolKind === "property" /* memberVariableElement */ || symbolKind === "accessor" /* memberAccessorVariableElement */ || symbolKind === "getter" /* memberGetAccessorElement */ || symbolKind === "setter" /* memberSetAccessorElement */ || symbolKind === "JSX attribute" /* jsxAttribute */ || symbolFlags & 3 /* Variable */ || symbolKind === "local var" /* localVariableElement */ || symbolKind === "index" /* indexSignatureElement */ || symbolKind === "using" /* variableUsingElement */ || symbolKind === "await using" /* variableAwaitUsingElement */ || isThisExpression) {
|
|
166979
167016
|
displayParts.push(punctuationPart(59 /* ColonToken */));
|
|
166980
167017
|
displayParts.push(spacePart());
|
|
166981
167018
|
if (type.symbol && type.symbol.flags & 262144 /* TypeParameter */ && symbolKind !== "index" /* indexSignatureElement */) {
|
|
@@ -167125,6 +167162,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
167125
167162
|
case "let" /* letElement */:
|
|
167126
167163
|
case "const" /* constElement */:
|
|
167127
167164
|
case "constructor" /* constructorImplementationElement */:
|
|
167165
|
+
case "using" /* variableUsingElement */:
|
|
167166
|
+
case "await using" /* variableAwaitUsingElement */:
|
|
167128
167167
|
displayParts.push(textOrKeywordPart(symbolKind2));
|
|
167129
167168
|
return;
|
|
167130
167169
|
default:
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.2";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20230709`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.2.0-pr-
|
|
5
|
+
"version": "5.2.0-pr-54935-7",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
"node": "20.1.0",
|
|
116
116
|
"npm": "8.19.4"
|
|
117
117
|
},
|
|
118
|
-
"gitHead": "
|
|
118
|
+
"gitHead": "4c1de3dcfe54b0cff2d2cfa69bc608b47083fe5b"
|
|
119
119
|
}
|