@typescript-deploys/pr-build 5.4.0-pr-56247-3 → 5.4.0-pr-56640-15
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 +14 -5
- package/lib/tsserver.js +19 -5
- package/lib/typescript.js +19 -5
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -53633,11 +53633,10 @@ function createTypeChecker(host) {
|
|
|
53633
53633
|
const baseTypes = getBaseTypes(source);
|
|
53634
53634
|
if (baseTypes.length) {
|
|
53635
53635
|
if (source.symbol && members === getMembersOfSymbol(source.symbol)) {
|
|
53636
|
-
const symbolTable = createSymbolTable();
|
|
53637
|
-
|
|
53638
|
-
|
|
53639
|
-
|
|
53640
|
-
}
|
|
53636
|
+
const symbolTable = createSymbolTable(source.declaredProperties);
|
|
53637
|
+
const sourceIndex = getIndexSymbol(source.symbol);
|
|
53638
|
+
if (sourceIndex) {
|
|
53639
|
+
symbolTable.set("__index" /* Index */, sourceIndex);
|
|
53641
53640
|
}
|
|
53642
53641
|
members = symbolTable;
|
|
53643
53642
|
}
|
|
@@ -64306,6 +64305,16 @@ function createTypeChecker(host) {
|
|
|
64306
64305
|
} else if (target.flags & 134217728 /* TemplateLiteral */) {
|
|
64307
64306
|
inferToTemplateLiteralType(source, target);
|
|
64308
64307
|
} else {
|
|
64308
|
+
if (isGenericMappedType(source) && isGenericMappedType(target)) {
|
|
64309
|
+
invokeOnce(source, target, (source2, target2) => {
|
|
64310
|
+
inferFromTypes(getConstraintTypeFromMappedType(source2), getConstraintTypeFromMappedType(target2));
|
|
64311
|
+
inferFromTypes(getTemplateTypeFromMappedType(source2), getTemplateTypeFromMappedType(target2));
|
|
64312
|
+
const sourceNameType = getNameTypeFromMappedType(source2);
|
|
64313
|
+
const targetNameType = getNameTypeFromMappedType(target2);
|
|
64314
|
+
if (sourceNameType && targetNameType)
|
|
64315
|
+
inferFromTypes(sourceNameType, targetNameType);
|
|
64316
|
+
});
|
|
64317
|
+
}
|
|
64309
64318
|
source = getReducedType(source);
|
|
64310
64319
|
if (!(priority & 512 /* NoConstraints */ && source.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */))) {
|
|
64311
64320
|
const apparentSource = getApparentType(source);
|
package/lib/tsserver.js
CHANGED
|
@@ -58362,11 +58362,10 @@ function createTypeChecker(host) {
|
|
|
58362
58362
|
const baseTypes = getBaseTypes(source);
|
|
58363
58363
|
if (baseTypes.length) {
|
|
58364
58364
|
if (source.symbol && members === getMembersOfSymbol(source.symbol)) {
|
|
58365
|
-
const symbolTable = createSymbolTable();
|
|
58366
|
-
|
|
58367
|
-
|
|
58368
|
-
|
|
58369
|
-
}
|
|
58365
|
+
const symbolTable = createSymbolTable(source.declaredProperties);
|
|
58366
|
+
const sourceIndex = getIndexSymbol(source.symbol);
|
|
58367
|
+
if (sourceIndex) {
|
|
58368
|
+
symbolTable.set("__index" /* Index */, sourceIndex);
|
|
58370
58369
|
}
|
|
58371
58370
|
members = symbolTable;
|
|
58372
58371
|
}
|
|
@@ -69035,6 +69034,16 @@ function createTypeChecker(host) {
|
|
|
69035
69034
|
} else if (target.flags & 134217728 /* TemplateLiteral */) {
|
|
69036
69035
|
inferToTemplateLiteralType(source, target);
|
|
69037
69036
|
} else {
|
|
69037
|
+
if (isGenericMappedType(source) && isGenericMappedType(target)) {
|
|
69038
|
+
invokeOnce(source, target, (source2, target2) => {
|
|
69039
|
+
inferFromTypes(getConstraintTypeFromMappedType(source2), getConstraintTypeFromMappedType(target2));
|
|
69040
|
+
inferFromTypes(getTemplateTypeFromMappedType(source2), getTemplateTypeFromMappedType(target2));
|
|
69041
|
+
const sourceNameType = getNameTypeFromMappedType(source2);
|
|
69042
|
+
const targetNameType = getNameTypeFromMappedType(target2);
|
|
69043
|
+
if (sourceNameType && targetNameType)
|
|
69044
|
+
inferFromTypes(sourceNameType, targetNameType);
|
|
69045
|
+
});
|
|
69046
|
+
}
|
|
69038
69047
|
source = getReducedType(source);
|
|
69039
69048
|
if (!(priority & 512 /* NoConstraints */ && source.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */))) {
|
|
69040
69049
|
const apparentSource = getApparentType(source);
|
|
@@ -159762,6 +159771,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
|
|
|
159762
159771
|
}
|
|
159763
159772
|
const semanticStart = timestamp();
|
|
159764
159773
|
let completionKind = 5 /* None */;
|
|
159774
|
+
let isNonContextualObjectLiteral = false;
|
|
159765
159775
|
let hasUnresolvedAutoImports = false;
|
|
159766
159776
|
let symbols = [];
|
|
159767
159777
|
let importSpecifierResolver;
|
|
@@ -160121,6 +160131,8 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
|
|
|
160121
160131
|
function shouldOfferImportCompletions() {
|
|
160122
160132
|
if (importStatementCompletion)
|
|
160123
160133
|
return true;
|
|
160134
|
+
if (isNonContextualObjectLiteral)
|
|
160135
|
+
return false;
|
|
160124
160136
|
if (!preferences.includeCompletionsForModuleExports)
|
|
160125
160137
|
return false;
|
|
160126
160138
|
if (sourceFile.externalModuleIndicator || sourceFile.commonJsModuleIndicator)
|
|
@@ -160423,6 +160435,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
|
|
|
160423
160435
|
if (objectLikeContainer.flags & 67108864 /* InWithStatement */) {
|
|
160424
160436
|
return 2 /* Fail */;
|
|
160425
160437
|
}
|
|
160438
|
+
isNonContextualObjectLiteral = true;
|
|
160426
160439
|
return 0 /* Continue */;
|
|
160427
160440
|
}
|
|
160428
160441
|
const completionsType = typeChecker.getContextualType(objectLikeContainer, 4 /* Completions */);
|
|
@@ -160433,6 +160446,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
|
|
|
160433
160446
|
existingMembers = objectLikeContainer.properties;
|
|
160434
160447
|
if (typeMembers.length === 0) {
|
|
160435
160448
|
if (!hasNumberIndextype) {
|
|
160449
|
+
isNonContextualObjectLiteral = true;
|
|
160436
160450
|
return 0 /* Continue */;
|
|
160437
160451
|
}
|
|
160438
160452
|
}
|
package/lib/typescript.js
CHANGED
|
@@ -56123,11 +56123,10 @@ ${lanes.join("\n")}
|
|
|
56123
56123
|
const baseTypes = getBaseTypes(source);
|
|
56124
56124
|
if (baseTypes.length) {
|
|
56125
56125
|
if (source.symbol && members === getMembersOfSymbol(source.symbol)) {
|
|
56126
|
-
const symbolTable = createSymbolTable();
|
|
56127
|
-
|
|
56128
|
-
|
|
56129
|
-
|
|
56130
|
-
}
|
|
56126
|
+
const symbolTable = createSymbolTable(source.declaredProperties);
|
|
56127
|
+
const sourceIndex = getIndexSymbol(source.symbol);
|
|
56128
|
+
if (sourceIndex) {
|
|
56129
|
+
symbolTable.set("__index" /* Index */, sourceIndex);
|
|
56131
56130
|
}
|
|
56132
56131
|
members = symbolTable;
|
|
56133
56132
|
}
|
|
@@ -66796,6 +66795,16 @@ ${lanes.join("\n")}
|
|
|
66796
66795
|
} else if (target.flags & 134217728 /* TemplateLiteral */) {
|
|
66797
66796
|
inferToTemplateLiteralType(source, target);
|
|
66798
66797
|
} else {
|
|
66798
|
+
if (isGenericMappedType(source) && isGenericMappedType(target)) {
|
|
66799
|
+
invokeOnce(source, target, (source2, target2) => {
|
|
66800
|
+
inferFromTypes(getConstraintTypeFromMappedType(source2), getConstraintTypeFromMappedType(target2));
|
|
66801
|
+
inferFromTypes(getTemplateTypeFromMappedType(source2), getTemplateTypeFromMappedType(target2));
|
|
66802
|
+
const sourceNameType = getNameTypeFromMappedType(source2);
|
|
66803
|
+
const targetNameType = getNameTypeFromMappedType(target2);
|
|
66804
|
+
if (sourceNameType && targetNameType)
|
|
66805
|
+
inferFromTypes(sourceNameType, targetNameType);
|
|
66806
|
+
});
|
|
66807
|
+
}
|
|
66799
66808
|
source = getReducedType(source);
|
|
66800
66809
|
if (!(priority & 512 /* NoConstraints */ && source.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */))) {
|
|
66801
66810
|
const apparentSource = getApparentType(source);
|
|
@@ -158972,6 +158981,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
158972
158981
|
}
|
|
158973
158982
|
const semanticStart = timestamp();
|
|
158974
158983
|
let completionKind = 5 /* None */;
|
|
158984
|
+
let isNonContextualObjectLiteral = false;
|
|
158975
158985
|
let hasUnresolvedAutoImports = false;
|
|
158976
158986
|
let symbols = [];
|
|
158977
158987
|
let importSpecifierResolver;
|
|
@@ -159331,6 +159341,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
159331
159341
|
function shouldOfferImportCompletions() {
|
|
159332
159342
|
if (importStatementCompletion)
|
|
159333
159343
|
return true;
|
|
159344
|
+
if (isNonContextualObjectLiteral)
|
|
159345
|
+
return false;
|
|
159334
159346
|
if (!preferences.includeCompletionsForModuleExports)
|
|
159335
159347
|
return false;
|
|
159336
159348
|
if (sourceFile.externalModuleIndicator || sourceFile.commonJsModuleIndicator)
|
|
@@ -159633,6 +159645,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
159633
159645
|
if (objectLikeContainer.flags & 67108864 /* InWithStatement */) {
|
|
159634
159646
|
return 2 /* Fail */;
|
|
159635
159647
|
}
|
|
159648
|
+
isNonContextualObjectLiteral = true;
|
|
159636
159649
|
return 0 /* Continue */;
|
|
159637
159650
|
}
|
|
159638
159651
|
const completionsType = typeChecker.getContextualType(objectLikeContainer, 4 /* Completions */);
|
|
@@ -159643,6 +159656,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
159643
159656
|
existingMembers = objectLikeContainer.properties;
|
|
159644
159657
|
if (typeMembers.length === 0) {
|
|
159645
159658
|
if (!hasNumberIndextype) {
|
|
159659
|
+
isNonContextualObjectLiteral = true;
|
|
159646
159660
|
return 0 /* Continue */;
|
|
159647
159661
|
}
|
|
159648
159662
|
}
|
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.4.0-pr-
|
|
5
|
+
"version": "5.4.0-pr-56640-15",
|
|
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": "4026160e842b53bdd5bb6b3e5694ad4496585386"
|
|
119
119
|
}
|