@typescript-deploys/pr-build 5.9.0-pr-62126-3 → 6.0.0-pr-62243-10
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 +42 -20
- package/lib/typescript.d.ts +1 -1
- package/lib/typescript.js +40 -62
- package/package.json +1 -1
package/lib/_tsc.js
CHANGED
|
@@ -17,8 +17,8 @@ and limitations under the License.
|
|
|
17
17
|
"use strict";
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
|
-
var versionMajorMinor = "
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
20
|
+
var versionMajorMinor = "6.0";
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20250811`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -14265,12 +14265,15 @@ function forEachYieldExpression(body, visitor) {
|
|
|
14265
14265
|
function traverse(node) {
|
|
14266
14266
|
switch (node.kind) {
|
|
14267
14267
|
case 230 /* YieldExpression */:
|
|
14268
|
-
visitor(node);
|
|
14268
|
+
const value = visitor(node);
|
|
14269
|
+
if (value) {
|
|
14270
|
+
return value;
|
|
14271
|
+
}
|
|
14269
14272
|
const operand = node.expression;
|
|
14270
|
-
if (operand) {
|
|
14271
|
-
|
|
14273
|
+
if (!operand) {
|
|
14274
|
+
return;
|
|
14272
14275
|
}
|
|
14273
|
-
return;
|
|
14276
|
+
return traverse(operand);
|
|
14274
14277
|
case 267 /* EnumDeclaration */:
|
|
14275
14278
|
case 265 /* InterfaceDeclaration */:
|
|
14276
14279
|
case 268 /* ModuleDeclaration */:
|
|
@@ -14279,11 +14282,10 @@ function forEachYieldExpression(body, visitor) {
|
|
|
14279
14282
|
default:
|
|
14280
14283
|
if (isFunctionLike(node)) {
|
|
14281
14284
|
if (node.name && node.name.kind === 168 /* ComputedPropertyName */) {
|
|
14282
|
-
traverse(node.name.expression);
|
|
14283
|
-
return;
|
|
14285
|
+
return traverse(node.name.expression);
|
|
14284
14286
|
}
|
|
14285
14287
|
} else if (!isPartOfTypeNode(node)) {
|
|
14286
|
-
forEachChild(node, traverse);
|
|
14288
|
+
return forEachChild(node, traverse);
|
|
14287
14289
|
}
|
|
14288
14290
|
}
|
|
14289
14291
|
}
|
|
@@ -15850,6 +15852,9 @@ function getSymbolNameForPrivateIdentifier(containingClassSymbol, description) {
|
|
|
15850
15852
|
function isKnownSymbol(symbol) {
|
|
15851
15853
|
return startsWith(symbol.escapedName, "__@");
|
|
15852
15854
|
}
|
|
15855
|
+
function isPrivateIdentifierSymbol(symbol) {
|
|
15856
|
+
return startsWith(symbol.escapedName, "__#");
|
|
15857
|
+
}
|
|
15853
15858
|
function isProtoSetter(node) {
|
|
15854
15859
|
return isIdentifier(node) ? idText(node) === "__proto__" : isStringLiteral(node) && node.text === "__proto__";
|
|
15855
15860
|
}
|
|
@@ -19130,7 +19135,7 @@ function hasContextSensitiveParameters(node) {
|
|
|
19130
19135
|
if (node.kind !== 220 /* ArrowFunction */) {
|
|
19131
19136
|
const parameter = firstOrUndefined(node.parameters);
|
|
19132
19137
|
if (!(parameter && parameterIsThisKeyword(parameter))) {
|
|
19133
|
-
return
|
|
19138
|
+
return !!(node.flags & 256 /* ContainsThis */);
|
|
19134
19139
|
}
|
|
19135
19140
|
}
|
|
19136
19141
|
}
|
|
@@ -19929,7 +19934,6 @@ var unprefixedNodeCoreModulesList = [
|
|
|
19929
19934
|
"stream/web",
|
|
19930
19935
|
"string_decoder",
|
|
19931
19936
|
"sys",
|
|
19932
|
-
"test/mock_loader",
|
|
19933
19937
|
"timers",
|
|
19934
19938
|
"timers/promises",
|
|
19935
19939
|
"tls",
|
|
@@ -19946,6 +19950,7 @@ var unprefixedNodeCoreModulesList = [
|
|
|
19946
19950
|
];
|
|
19947
19951
|
var unprefixedNodeCoreModules = new Set(unprefixedNodeCoreModulesList);
|
|
19948
19952
|
var exclusivelyPrefixedNodeCoreModules = /* @__PURE__ */ new Set([
|
|
19953
|
+
"node:quic",
|
|
19949
19954
|
"node:sea",
|
|
19950
19955
|
"node:sqlite",
|
|
19951
19956
|
"node:test",
|
|
@@ -42644,6 +42649,7 @@ function createBinder() {
|
|
|
42644
42649
|
const saveExceptionTarget = currentExceptionTarget;
|
|
42645
42650
|
const saveActiveLabelList = activeLabelList;
|
|
42646
42651
|
const saveHasExplicitReturn = hasExplicitReturn;
|
|
42652
|
+
const saveSeenThisKeyword = seenThisKeyword;
|
|
42647
42653
|
const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 1024 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 176 /* ClassStaticBlockDeclaration */;
|
|
42648
42654
|
if (!isImmediatelyInvoked) {
|
|
42649
42655
|
currentFlow = createFlowNode(
|
|
@@ -42663,13 +42669,17 @@ function createBinder() {
|
|
|
42663
42669
|
currentContinueTarget = void 0;
|
|
42664
42670
|
activeLabelList = void 0;
|
|
42665
42671
|
hasExplicitReturn = false;
|
|
42672
|
+
seenThisKeyword = false;
|
|
42666
42673
|
bindChildren(node);
|
|
42667
|
-
node.flags &= ~5632 /* ReachabilityAndEmitFlags
|
|
42674
|
+
node.flags &= ~(5632 /* ReachabilityAndEmitFlags */ | 256 /* ContainsThis */);
|
|
42668
42675
|
if (!(currentFlow.flags & 1 /* Unreachable */) && containerFlags & 8 /* IsFunctionLike */ && nodeIsPresent(node.body)) {
|
|
42669
42676
|
node.flags |= 512 /* HasImplicitReturn */;
|
|
42670
42677
|
if (hasExplicitReturn) node.flags |= 1024 /* HasExplicitReturn */;
|
|
42671
42678
|
node.endFlowNode = currentFlow;
|
|
42672
42679
|
}
|
|
42680
|
+
if (seenThisKeyword) {
|
|
42681
|
+
node.flags |= 256 /* ContainsThis */;
|
|
42682
|
+
}
|
|
42673
42683
|
if (node.kind === 308 /* SourceFile */) {
|
|
42674
42684
|
node.flags |= emitFlags;
|
|
42675
42685
|
node.endFlowNode = currentFlow;
|
|
@@ -42690,11 +42700,14 @@ function createBinder() {
|
|
|
42690
42700
|
currentExceptionTarget = saveExceptionTarget;
|
|
42691
42701
|
activeLabelList = saveActiveLabelList;
|
|
42692
42702
|
hasExplicitReturn = saveHasExplicitReturn;
|
|
42703
|
+
seenThisKeyword = node.kind === 220 /* ArrowFunction */ ? saveSeenThisKeyword || seenThisKeyword : saveSeenThisKeyword;
|
|
42693
42704
|
} else if (containerFlags & 64 /* IsInterface */) {
|
|
42705
|
+
const saveSeenThisKeyword = seenThisKeyword;
|
|
42694
42706
|
seenThisKeyword = false;
|
|
42695
42707
|
bindChildren(node);
|
|
42696
42708
|
Debug.assertNotNode(node, isIdentifier);
|
|
42697
42709
|
node.flags = seenThisKeyword ? node.flags | 256 /* ContainsThis */ : node.flags & ~256 /* ContainsThis */;
|
|
42710
|
+
seenThisKeyword = saveSeenThisKeyword;
|
|
42698
42711
|
} else {
|
|
42699
42712
|
bindChildren(node);
|
|
42700
42713
|
}
|
|
@@ -44182,6 +44195,9 @@ function createBinder() {
|
|
|
44182
44195
|
}
|
|
44183
44196
|
// falls through
|
|
44184
44197
|
case 110 /* ThisKeyword */:
|
|
44198
|
+
if (node.kind === 110 /* ThisKeyword */) {
|
|
44199
|
+
seenThisKeyword = true;
|
|
44200
|
+
}
|
|
44185
44201
|
if (currentFlow && (isExpression(node) || parent.kind === 305 /* ShorthandPropertyAssignment */)) {
|
|
44186
44202
|
node.flowNode = currentFlow;
|
|
44187
44203
|
}
|
|
@@ -45104,6 +45120,8 @@ function getContainerFlags(node) {
|
|
|
45104
45120
|
// falls through
|
|
45105
45121
|
case 177 /* Constructor */:
|
|
45106
45122
|
case 263 /* FunctionDeclaration */:
|
|
45123
|
+
case 176 /* ClassStaticBlockDeclaration */:
|
|
45124
|
+
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */;
|
|
45107
45125
|
case 174 /* MethodSignature */:
|
|
45108
45126
|
case 180 /* CallSignature */:
|
|
45109
45127
|
case 324 /* JSDocSignature */:
|
|
@@ -45111,17 +45129,14 @@ function getContainerFlags(node) {
|
|
|
45111
45129
|
case 185 /* FunctionType */:
|
|
45112
45130
|
case 181 /* ConstructSignature */:
|
|
45113
45131
|
case 186 /* ConstructorType */:
|
|
45114
|
-
|
|
45115
|
-
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */;
|
|
45132
|
+
return 1 /* IsContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */;
|
|
45116
45133
|
case 352 /* JSDocImportTag */:
|
|
45117
|
-
return 1 /* IsContainer */ |
|
|
45134
|
+
return 1 /* IsContainer */ | 32 /* HasLocals */;
|
|
45118
45135
|
case 219 /* FunctionExpression */:
|
|
45119
45136
|
case 220 /* ArrowFunction */:
|
|
45120
45137
|
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */;
|
|
45121
45138
|
case 269 /* ModuleBlock */:
|
|
45122
45139
|
return 4 /* IsControlFlowContainer */;
|
|
45123
|
-
case 173 /* PropertyDeclaration */:
|
|
45124
|
-
return node.initializer ? 4 /* IsControlFlowContainer */ : 0;
|
|
45125
45140
|
case 300 /* CatchClause */:
|
|
45126
45141
|
case 249 /* ForStatement */:
|
|
45127
45142
|
case 250 /* ForInStatement */:
|
|
@@ -52068,6 +52083,9 @@ function createTypeChecker(host) {
|
|
|
52068
52083
|
if (getDeclarationModifierFlagsFromSymbol(propertySymbol) & (2 /* Private */ | 4 /* Protected */) && context.tracker.reportPrivateInBaseOfClassExpression) {
|
|
52069
52084
|
context.tracker.reportPrivateInBaseOfClassExpression(unescapeLeadingUnderscores(propertySymbol.escapedName));
|
|
52070
52085
|
}
|
|
52086
|
+
if (isPrivateIdentifierSymbol(propertySymbol) && context.tracker.reportPrivateInBaseOfClassExpression) {
|
|
52087
|
+
context.tracker.reportPrivateInBaseOfClassExpression(idText(propertySymbol.valueDeclaration.name));
|
|
52088
|
+
}
|
|
52071
52089
|
}
|
|
52072
52090
|
if (checkTruncationLength(context) && i + 2 < properties.length - 1) {
|
|
52073
52091
|
context.out.truncated = true;
|
|
@@ -63732,7 +63750,8 @@ function createTypeChecker(host) {
|
|
|
63732
63750
|
const { initializer } = node;
|
|
63733
63751
|
return !!initializer && isContextSensitive(initializer);
|
|
63734
63752
|
}
|
|
63735
|
-
case 295 /* JsxExpression */:
|
|
63753
|
+
case 295 /* JsxExpression */:
|
|
63754
|
+
case 230 /* YieldExpression */: {
|
|
63736
63755
|
const { expression } = node;
|
|
63737
63756
|
return !!expression && isContextSensitive(expression);
|
|
63738
63757
|
}
|
|
@@ -63740,7 +63759,7 @@ function createTypeChecker(host) {
|
|
|
63740
63759
|
return false;
|
|
63741
63760
|
}
|
|
63742
63761
|
function isContextSensitiveFunctionLikeDeclaration(node) {
|
|
63743
|
-
return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node);
|
|
63762
|
+
return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node) || !!(getFunctionFlags(node) & 1 /* Generator */ && node.body && forEachYieldExpression(node.body, isContextSensitive));
|
|
63744
63763
|
}
|
|
63745
63764
|
function hasContextSensitiveReturnExpression(node) {
|
|
63746
63765
|
if (node.typeParameters || getEffectiveReturnTypeNode(node) || !node.body) {
|
|
@@ -73282,7 +73301,10 @@ function createTypeChecker(host) {
|
|
|
73282
73301
|
if (contextualType && maybeTypeOfKind(contextualType, 465829888 /* Instantiable */)) {
|
|
73283
73302
|
const inferenceContext = getInferenceContext(node);
|
|
73284
73303
|
if (inferenceContext && contextFlags & 1 /* Signature */ && some(inferenceContext.inferences, hasInferenceCandidatesOrDefault)) {
|
|
73285
|
-
|
|
73304
|
+
const type = instantiateInstantiableTypes(contextualType, inferenceContext.nonFixingMapper);
|
|
73305
|
+
if (!(type.flags & 3 /* AnyOrUnknown */)) {
|
|
73306
|
+
return type;
|
|
73307
|
+
}
|
|
73286
73308
|
}
|
|
73287
73309
|
if (inferenceContext == null ? void 0 : inferenceContext.returnMapper) {
|
|
73288
73310
|
const type = instantiateInstantiableTypes(contextualType, inferenceContext.returnMapper);
|
package/lib/typescript.d.ts
CHANGED
|
@@ -3646,7 +3646,7 @@ declare namespace ts {
|
|
|
3646
3646
|
readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[] | undefined, depth?: number): string[];
|
|
3647
3647
|
}
|
|
3648
3648
|
}
|
|
3649
|
-
const versionMajorMinor = "
|
|
3649
|
+
const versionMajorMinor = "6.0";
|
|
3650
3650
|
/** The version of the TypeScript compiler release */
|
|
3651
3651
|
const version: string;
|
|
3652
3652
|
/**
|
package/lib/typescript.js
CHANGED
|
@@ -2284,8 +2284,8 @@ __export(typescript_exports, {
|
|
|
2284
2284
|
module.exports = __toCommonJS(typescript_exports);
|
|
2285
2285
|
|
|
2286
2286
|
// src/compiler/corePublic.ts
|
|
2287
|
-
var versionMajorMinor = "
|
|
2288
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2287
|
+
var versionMajorMinor = "6.0";
|
|
2288
|
+
var version = `${versionMajorMinor}.0-insiders.20250811`;
|
|
2289
2289
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2290
2290
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2291
2291
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -17952,12 +17952,15 @@ function forEachYieldExpression(body, visitor) {
|
|
|
17952
17952
|
function traverse(node) {
|
|
17953
17953
|
switch (node.kind) {
|
|
17954
17954
|
case 230 /* YieldExpression */:
|
|
17955
|
-
visitor(node);
|
|
17955
|
+
const value = visitor(node);
|
|
17956
|
+
if (value) {
|
|
17957
|
+
return value;
|
|
17958
|
+
}
|
|
17956
17959
|
const operand = node.expression;
|
|
17957
|
-
if (operand) {
|
|
17958
|
-
|
|
17960
|
+
if (!operand) {
|
|
17961
|
+
return;
|
|
17959
17962
|
}
|
|
17960
|
-
return;
|
|
17963
|
+
return traverse(operand);
|
|
17961
17964
|
case 267 /* EnumDeclaration */:
|
|
17962
17965
|
case 265 /* InterfaceDeclaration */:
|
|
17963
17966
|
case 268 /* ModuleDeclaration */:
|
|
@@ -17966,11 +17969,10 @@ function forEachYieldExpression(body, visitor) {
|
|
|
17966
17969
|
default:
|
|
17967
17970
|
if (isFunctionLike(node)) {
|
|
17968
17971
|
if (node.name && node.name.kind === 168 /* ComputedPropertyName */) {
|
|
17969
|
-
traverse(node.name.expression);
|
|
17970
|
-
return;
|
|
17972
|
+
return traverse(node.name.expression);
|
|
17971
17973
|
}
|
|
17972
17974
|
} else if (!isPartOfTypeNode(node)) {
|
|
17973
|
-
forEachChild(node, traverse);
|
|
17975
|
+
return forEachChild(node, traverse);
|
|
17974
17976
|
}
|
|
17975
17977
|
}
|
|
17976
17978
|
}
|
|
@@ -23121,7 +23123,7 @@ function hasContextSensitiveParameters(node) {
|
|
|
23121
23123
|
if (node.kind !== 220 /* ArrowFunction */) {
|
|
23122
23124
|
const parameter = firstOrUndefined(node.parameters);
|
|
23123
23125
|
if (!(parameter && parameterIsThisKeyword(parameter))) {
|
|
23124
|
-
return
|
|
23126
|
+
return !!(node.flags & 256 /* ContainsThis */);
|
|
23125
23127
|
}
|
|
23126
23128
|
}
|
|
23127
23129
|
}
|
|
@@ -24026,7 +24028,6 @@ var unprefixedNodeCoreModulesList = [
|
|
|
24026
24028
|
"stream/web",
|
|
24027
24029
|
"string_decoder",
|
|
24028
24030
|
"sys",
|
|
24029
|
-
"test/mock_loader",
|
|
24030
24031
|
"timers",
|
|
24031
24032
|
"timers/promises",
|
|
24032
24033
|
"tls",
|
|
@@ -24043,6 +24044,7 @@ var unprefixedNodeCoreModulesList = [
|
|
|
24043
24044
|
];
|
|
24044
24045
|
var unprefixedNodeCoreModules = new Set(unprefixedNodeCoreModulesList);
|
|
24045
24046
|
var exclusivelyPrefixedNodeCoreModules = /* @__PURE__ */ new Set([
|
|
24047
|
+
"node:quic",
|
|
24046
24048
|
"node:sea",
|
|
24047
24049
|
"node:sqlite",
|
|
24048
24050
|
"node:test",
|
|
@@ -47155,6 +47157,7 @@ function createBinder() {
|
|
|
47155
47157
|
const saveExceptionTarget = currentExceptionTarget;
|
|
47156
47158
|
const saveActiveLabelList = activeLabelList;
|
|
47157
47159
|
const saveHasExplicitReturn = hasExplicitReturn;
|
|
47160
|
+
const saveSeenThisKeyword = seenThisKeyword;
|
|
47158
47161
|
const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 1024 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 176 /* ClassStaticBlockDeclaration */;
|
|
47159
47162
|
if (!isImmediatelyInvoked) {
|
|
47160
47163
|
currentFlow = createFlowNode(
|
|
@@ -47174,13 +47177,17 @@ function createBinder() {
|
|
|
47174
47177
|
currentContinueTarget = void 0;
|
|
47175
47178
|
activeLabelList = void 0;
|
|
47176
47179
|
hasExplicitReturn = false;
|
|
47180
|
+
seenThisKeyword = false;
|
|
47177
47181
|
bindChildren(node);
|
|
47178
|
-
node.flags &= ~5632 /* ReachabilityAndEmitFlags
|
|
47182
|
+
node.flags &= ~(5632 /* ReachabilityAndEmitFlags */ | 256 /* ContainsThis */);
|
|
47179
47183
|
if (!(currentFlow.flags & 1 /* Unreachable */) && containerFlags & 8 /* IsFunctionLike */ && nodeIsPresent(node.body)) {
|
|
47180
47184
|
node.flags |= 512 /* HasImplicitReturn */;
|
|
47181
47185
|
if (hasExplicitReturn) node.flags |= 1024 /* HasExplicitReturn */;
|
|
47182
47186
|
node.endFlowNode = currentFlow;
|
|
47183
47187
|
}
|
|
47188
|
+
if (seenThisKeyword) {
|
|
47189
|
+
node.flags |= 256 /* ContainsThis */;
|
|
47190
|
+
}
|
|
47184
47191
|
if (node.kind === 308 /* SourceFile */) {
|
|
47185
47192
|
node.flags |= emitFlags;
|
|
47186
47193
|
node.endFlowNode = currentFlow;
|
|
@@ -47201,11 +47208,14 @@ function createBinder() {
|
|
|
47201
47208
|
currentExceptionTarget = saveExceptionTarget;
|
|
47202
47209
|
activeLabelList = saveActiveLabelList;
|
|
47203
47210
|
hasExplicitReturn = saveHasExplicitReturn;
|
|
47211
|
+
seenThisKeyword = node.kind === 220 /* ArrowFunction */ ? saveSeenThisKeyword || seenThisKeyword : saveSeenThisKeyword;
|
|
47204
47212
|
} else if (containerFlags & 64 /* IsInterface */) {
|
|
47213
|
+
const saveSeenThisKeyword = seenThisKeyword;
|
|
47205
47214
|
seenThisKeyword = false;
|
|
47206
47215
|
bindChildren(node);
|
|
47207
47216
|
Debug.assertNotNode(node, isIdentifier);
|
|
47208
47217
|
node.flags = seenThisKeyword ? node.flags | 256 /* ContainsThis */ : node.flags & ~256 /* ContainsThis */;
|
|
47218
|
+
seenThisKeyword = saveSeenThisKeyword;
|
|
47209
47219
|
} else {
|
|
47210
47220
|
bindChildren(node);
|
|
47211
47221
|
}
|
|
@@ -48693,6 +48703,9 @@ function createBinder() {
|
|
|
48693
48703
|
}
|
|
48694
48704
|
// falls through
|
|
48695
48705
|
case 110 /* ThisKeyword */:
|
|
48706
|
+
if (node.kind === 110 /* ThisKeyword */) {
|
|
48707
|
+
seenThisKeyword = true;
|
|
48708
|
+
}
|
|
48696
48709
|
if (currentFlow && (isExpression(node) || parent2.kind === 305 /* ShorthandPropertyAssignment */)) {
|
|
48697
48710
|
node.flowNode = currentFlow;
|
|
48698
48711
|
}
|
|
@@ -49615,6 +49628,8 @@ function getContainerFlags(node) {
|
|
|
49615
49628
|
// falls through
|
|
49616
49629
|
case 177 /* Constructor */:
|
|
49617
49630
|
case 263 /* FunctionDeclaration */:
|
|
49631
|
+
case 176 /* ClassStaticBlockDeclaration */:
|
|
49632
|
+
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */;
|
|
49618
49633
|
case 174 /* MethodSignature */:
|
|
49619
49634
|
case 180 /* CallSignature */:
|
|
49620
49635
|
case 324 /* JSDocSignature */:
|
|
@@ -49622,17 +49637,14 @@ function getContainerFlags(node) {
|
|
|
49622
49637
|
case 185 /* FunctionType */:
|
|
49623
49638
|
case 181 /* ConstructSignature */:
|
|
49624
49639
|
case 186 /* ConstructorType */:
|
|
49625
|
-
|
|
49626
|
-
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */;
|
|
49640
|
+
return 1 /* IsContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */;
|
|
49627
49641
|
case 352 /* JSDocImportTag */:
|
|
49628
|
-
return 1 /* IsContainer */ |
|
|
49642
|
+
return 1 /* IsContainer */ | 32 /* HasLocals */;
|
|
49629
49643
|
case 219 /* FunctionExpression */:
|
|
49630
49644
|
case 220 /* ArrowFunction */:
|
|
49631
49645
|
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */;
|
|
49632
49646
|
case 269 /* ModuleBlock */:
|
|
49633
49647
|
return 4 /* IsControlFlowContainer */;
|
|
49634
|
-
case 173 /* PropertyDeclaration */:
|
|
49635
|
-
return node.initializer ? 4 /* IsControlFlowContainer */ : 0;
|
|
49636
49648
|
case 300 /* CatchClause */:
|
|
49637
49649
|
case 249 /* ForStatement */:
|
|
49638
49650
|
case 250 /* ForInStatement */:
|
|
@@ -56679,6 +56691,9 @@ function createTypeChecker(host) {
|
|
|
56679
56691
|
if (getDeclarationModifierFlagsFromSymbol(propertySymbol) & (2 /* Private */ | 4 /* Protected */) && context.tracker.reportPrivateInBaseOfClassExpression) {
|
|
56680
56692
|
context.tracker.reportPrivateInBaseOfClassExpression(unescapeLeadingUnderscores(propertySymbol.escapedName));
|
|
56681
56693
|
}
|
|
56694
|
+
if (isPrivateIdentifierSymbol(propertySymbol) && context.tracker.reportPrivateInBaseOfClassExpression) {
|
|
56695
|
+
context.tracker.reportPrivateInBaseOfClassExpression(idText(propertySymbol.valueDeclaration.name));
|
|
56696
|
+
}
|
|
56682
56697
|
}
|
|
56683
56698
|
if (checkTruncationLength(context) && i + 2 < properties.length - 1) {
|
|
56684
56699
|
context.out.truncated = true;
|
|
@@ -68343,7 +68358,8 @@ function createTypeChecker(host) {
|
|
|
68343
68358
|
const { initializer } = node;
|
|
68344
68359
|
return !!initializer && isContextSensitive(initializer);
|
|
68345
68360
|
}
|
|
68346
|
-
case 295 /* JsxExpression */:
|
|
68361
|
+
case 295 /* JsxExpression */:
|
|
68362
|
+
case 230 /* YieldExpression */: {
|
|
68347
68363
|
const { expression } = node;
|
|
68348
68364
|
return !!expression && isContextSensitive(expression);
|
|
68349
68365
|
}
|
|
@@ -68351,7 +68367,7 @@ function createTypeChecker(host) {
|
|
|
68351
68367
|
return false;
|
|
68352
68368
|
}
|
|
68353
68369
|
function isContextSensitiveFunctionLikeDeclaration(node) {
|
|
68354
|
-
return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node);
|
|
68370
|
+
return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node) || !!(getFunctionFlags(node) & 1 /* Generator */ && node.body && forEachYieldExpression(node.body, isContextSensitive));
|
|
68355
68371
|
}
|
|
68356
68372
|
function hasContextSensitiveReturnExpression(node) {
|
|
68357
68373
|
if (node.typeParameters || getEffectiveReturnTypeNode(node) || !node.body) {
|
|
@@ -77893,7 +77909,10 @@ function createTypeChecker(host) {
|
|
|
77893
77909
|
if (contextualType && maybeTypeOfKind(contextualType, 465829888 /* Instantiable */)) {
|
|
77894
77910
|
const inferenceContext = getInferenceContext(node);
|
|
77895
77911
|
if (inferenceContext && contextFlags & 1 /* Signature */ && some(inferenceContext.inferences, hasInferenceCandidatesOrDefault)) {
|
|
77896
|
-
|
|
77912
|
+
const type = instantiateInstantiableTypes(contextualType, inferenceContext.nonFixingMapper);
|
|
77913
|
+
if (!(type.flags & 3 /* AnyOrUnknown */)) {
|
|
77914
|
+
return type;
|
|
77915
|
+
}
|
|
77897
77916
|
}
|
|
77898
77917
|
if (inferenceContext == null ? void 0 : inferenceContext.returnMapper) {
|
|
77899
77918
|
const type = instantiateInstantiableTypes(contextualType, inferenceContext.returnMapper);
|
|
@@ -167322,45 +167341,6 @@ function keywordFiltersFromSyntaxKind(keywordCompletion) {
|
|
|
167322
167341
|
function getOptionalReplacementSpan(location) {
|
|
167323
167342
|
return (location == null ? void 0 : location.kind) === 80 /* Identifier */ ? createTextSpanFromNode(location) : void 0;
|
|
167324
167343
|
}
|
|
167325
|
-
function shouldPrioritizeCaseAndDefaultKeywords(contextToken, position) {
|
|
167326
|
-
if (!contextToken) return false;
|
|
167327
|
-
const switchStatement = findAncestor(contextToken, (node) => node.kind === 256 /* SwitchStatement */ ? true : isFunctionLikeDeclaration(node) || isClassLike(node) ? "quit" : false);
|
|
167328
|
-
if (!switchStatement) return false;
|
|
167329
|
-
const sourceFile = contextToken.getSourceFile();
|
|
167330
|
-
const { line: currentLine, character: currentColumn } = getLineAndCharacterOfPosition(sourceFile, position);
|
|
167331
|
-
if (contextToken.parent === switchStatement.caseBlock) {
|
|
167332
|
-
return true;
|
|
167333
|
-
}
|
|
167334
|
-
const caseBlock = switchStatement.caseBlock;
|
|
167335
|
-
if (!caseBlock) return false;
|
|
167336
|
-
let lastClause;
|
|
167337
|
-
for (const clause of caseBlock.clauses) {
|
|
167338
|
-
if (clause.pos >= position) break;
|
|
167339
|
-
lastClause = clause;
|
|
167340
|
-
}
|
|
167341
|
-
if (!lastClause) return false;
|
|
167342
|
-
const clauseKeywordPos = lastClause.kind === 297 /* CaseClause */ ? lastClause.getFirstToken(sourceFile).getStart(sourceFile) : lastClause.getFirstToken(sourceFile).getStart(sourceFile);
|
|
167343
|
-
const { line: clauseLine, character: clauseColumn } = getLineAndCharacterOfPosition(sourceFile, clauseKeywordPos);
|
|
167344
|
-
if (currentLine === clauseLine || currentColumn !== clauseColumn) {
|
|
167345
|
-
return false;
|
|
167346
|
-
}
|
|
167347
|
-
if (!lastClause.statements || lastClause.statements.length === 0) {
|
|
167348
|
-
return false;
|
|
167349
|
-
}
|
|
167350
|
-
const lastStatement = lastClause.statements[lastClause.statements.length - 1];
|
|
167351
|
-
const { line: stmtLine, character: stmtColumn } = getLineAndCharacterOfPosition(sourceFile, lastStatement.getStart(sourceFile));
|
|
167352
|
-
const isJumpStatement = isBreakOrContinueStatement(lastStatement) || lastStatement.kind === 254 /* ReturnStatement */ || lastStatement.kind === 258 /* ThrowStatement */;
|
|
167353
|
-
if (isJumpStatement) {
|
|
167354
|
-
if (stmtLine === clauseLine || stmtLine !== clauseLine && stmtColumn !== clauseColumn) {
|
|
167355
|
-
return true;
|
|
167356
|
-
}
|
|
167357
|
-
} else {
|
|
167358
|
-
if (stmtLine !== clauseLine && stmtColumn !== clauseColumn) {
|
|
167359
|
-
return true;
|
|
167360
|
-
}
|
|
167361
|
-
}
|
|
167362
|
-
return false;
|
|
167363
|
-
}
|
|
167364
167344
|
function completionInfoFromData(sourceFile, host, program, compilerOptions, log, completionData, preferences, formatContext, position, includeSymbol) {
|
|
167365
167345
|
const {
|
|
167366
167346
|
symbols,
|
|
@@ -167440,14 +167420,12 @@ function completionInfoFromData(sourceFile, host, program, compilerOptions, log,
|
|
|
167440
167420
|
includeSymbol
|
|
167441
167421
|
);
|
|
167442
167422
|
if (keywordFilters !== 0 /* None */) {
|
|
167443
|
-
const shouldPrioritizeCaseDefault = shouldPrioritizeCaseAndDefaultKeywords(contextToken, position);
|
|
167444
167423
|
for (const keywordEntry of getKeywordCompletions(keywordFilters, !insideJsDocTagTypeExpression && isSourceFileJS(sourceFile))) {
|
|
167445
167424
|
if (isTypeOnlyLocation && isTypeKeyword(stringToToken(keywordEntry.name)) || !isTypeOnlyLocation && isContextualKeywordInAutoImportableExpressionSpace(keywordEntry.name) || !uniqueNames.has(keywordEntry.name)) {
|
|
167446
167425
|
uniqueNames.add(keywordEntry.name);
|
|
167447
|
-
const modifiedKeywordEntry = shouldPrioritizeCaseDefault && (keywordEntry.name === "case" || keywordEntry.name === "default") ? { ...keywordEntry, sortText: SortText.LocalDeclarationPriority } : keywordEntry;
|
|
167448
167426
|
insertSorted(
|
|
167449
167427
|
entries,
|
|
167450
|
-
|
|
167428
|
+
keywordEntry,
|
|
167451
167429
|
compareCompletionEntries,
|
|
167452
167430
|
/*equalityComparer*/
|
|
167453
167431
|
void 0,
|
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
|
+
"version": "6.0.0-pr-62243-10",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|