typescript 4.6.0-dev.20211203 → 4.6.0-dev.20211207
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 +59 -41
- package/lib/tsserver.js +110 -53
- package/lib/tsserverlibrary.d.ts +2 -0
- package/lib/tsserverlibrary.js +110 -53
- package/lib/typescript.d.ts +2 -0
- package/lib/typescript.js +108 -51
- package/lib/typescriptServices.d.ts +2 -0
- package/lib/typescriptServices.js +108 -51
- package/lib/typingsInstaller.js +62 -42
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.6";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20211207";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
function tryGetNativeMap() {
|
|
@@ -738,7 +738,11 @@ var ts;
|
|
|
738
738
|
}
|
|
739
739
|
return deduplicated;
|
|
740
740
|
}
|
|
741
|
-
function
|
|
741
|
+
function createSortedArray() {
|
|
742
|
+
return [];
|
|
743
|
+
}
|
|
744
|
+
ts.createSortedArray = createSortedArray;
|
|
745
|
+
function insertSorted(array, insert, compare, allowDuplicates) {
|
|
742
746
|
if (array.length === 0) {
|
|
743
747
|
array.push(insert);
|
|
744
748
|
return;
|
|
@@ -747,6 +751,9 @@ var ts;
|
|
|
747
751
|
if (insertIndex < 0) {
|
|
748
752
|
array.splice(~insertIndex, 0, insert);
|
|
749
753
|
}
|
|
754
|
+
else if (allowDuplicates) {
|
|
755
|
+
array.splice(insertIndex, 0, insert);
|
|
756
|
+
}
|
|
750
757
|
}
|
|
751
758
|
ts.insertSorted = insertSorted;
|
|
752
759
|
function sortAndDeduplicate(array, comparer, equalityComparer) {
|
|
@@ -5144,7 +5151,7 @@ var ts;
|
|
|
5144
5151
|
Duplicate_label_0: diag(1114, ts.DiagnosticCategory.Error, "Duplicate_label_0_1114", "Duplicate label '{0}'."),
|
|
5145
5152
|
A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: diag(1115, ts.DiagnosticCategory.Error, "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", "A 'continue' statement can only jump to a label of an enclosing iteration statement."),
|
|
5146
5153
|
A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: diag(1116, ts.DiagnosticCategory.Error, "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116", "A 'break' statement can only jump to a label of an enclosing statement."),
|
|
5147
|
-
|
|
5154
|
+
An_object_literal_cannot_have_multiple_properties_with_the_same_name: diag(1117, ts.DiagnosticCategory.Error, "An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117", "An object literal cannot have multiple properties with the same name."),
|
|
5148
5155
|
An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name: diag(1118, ts.DiagnosticCategory.Error, "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118", "An object literal cannot have multiple get/set accessors with the same name."),
|
|
5149
5156
|
An_object_literal_cannot_have_property_and_accessor_with_the_same_name: diag(1119, ts.DiagnosticCategory.Error, "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119", "An object literal cannot have property and accessor with the same name."),
|
|
5150
5157
|
An_export_assignment_cannot_have_modifiers: diag(1120, ts.DiagnosticCategory.Error, "An_export_assignment_cannot_have_modifiers_1120", "An export assignment cannot have modifiers."),
|
|
@@ -5431,6 +5438,7 @@ var ts;
|
|
|
5431
5438
|
Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity: diag(2308, ts.DiagnosticCategory.Error, "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308", "Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."),
|
|
5432
5439
|
An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: diag(2309, ts.DiagnosticCategory.Error, "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309", "An export assignment cannot be used in a module with other exported elements."),
|
|
5433
5440
|
Type_0_recursively_references_itself_as_a_base_type: diag(2310, ts.DiagnosticCategory.Error, "Type_0_recursively_references_itself_as_a_base_type_2310", "Type '{0}' recursively references itself as a base type."),
|
|
5441
|
+
Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function: diag(2311, ts.DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311", "Cannot find name '{0}'. Did you mean to write this in an async function?"),
|
|
5434
5442
|
An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2312, ts.DiagnosticCategory.Error, "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312", "An interface can only extend an object type or intersection of object types with statically known members."),
|
|
5435
5443
|
Type_parameter_0_has_a_circular_constraint: diag(2313, ts.DiagnosticCategory.Error, "Type_parameter_0_has_a_circular_constraint_2313", "Type parameter '{0}' has a circular constraint."),
|
|
5436
5444
|
Generic_type_0_requires_1_type_argument_s: diag(2314, ts.DiagnosticCategory.Error, "Generic_type_0_requires_1_type_argument_s_2314", "Generic type '{0}' requires {1} type argument(s)."),
|
|
@@ -16516,6 +16524,10 @@ var ts;
|
|
|
16516
16524
|
return text.replace(/\$/gm, "\\$");
|
|
16517
16525
|
}
|
|
16518
16526
|
ts.escapeSnippetText = escapeSnippetText;
|
|
16527
|
+
function isThisTypeParameter(type) {
|
|
16528
|
+
return !!(type.flags & 262144 && type.isThisType);
|
|
16529
|
+
}
|
|
16530
|
+
ts.isThisTypeParameter = isThisTypeParameter;
|
|
16519
16531
|
})(ts || (ts = {}));
|
|
16520
16532
|
var ts;
|
|
16521
16533
|
(function (ts) {
|
|
@@ -27071,7 +27083,11 @@ var ts;
|
|
|
27071
27083
|
if (type && !allowAmbiguity && typeHasArrowFunctionBlockingParseError(type)) {
|
|
27072
27084
|
return undefined;
|
|
27073
27085
|
}
|
|
27074
|
-
var
|
|
27086
|
+
var unwrappedType = type;
|
|
27087
|
+
while ((unwrappedType === null || unwrappedType === void 0 ? void 0 : unwrappedType.kind) === 190) {
|
|
27088
|
+
unwrappedType = unwrappedType.type;
|
|
27089
|
+
}
|
|
27090
|
+
var hasJSDocFunctionType = unwrappedType && ts.isJSDocFunctionType(unwrappedType);
|
|
27075
27091
|
if (!allowAmbiguity && token() !== 38 && (hasJSDocFunctionType || token() !== 18)) {
|
|
27076
27092
|
return undefined;
|
|
27077
27093
|
}
|
|
@@ -33811,7 +33827,10 @@ var ts;
|
|
|
33811
33827
|
}
|
|
33812
33828
|
}
|
|
33813
33829
|
var failedLookupLocations = [];
|
|
33814
|
-
var
|
|
33830
|
+
var features = ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node12 ? NodeResolutionFeatures.Node12Default :
|
|
33831
|
+
ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext ? NodeResolutionFeatures.NodeNextDefault :
|
|
33832
|
+
NodeResolutionFeatures.None;
|
|
33833
|
+
var moduleResolutionState = { compilerOptions: options, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache, features: features, conditions: ["node", "require", "types"] };
|
|
33815
33834
|
var resolved = primaryLookup();
|
|
33816
33835
|
var primary = true;
|
|
33817
33836
|
if (!resolved) {
|
|
@@ -34364,13 +34383,15 @@ var ts;
|
|
|
34364
34383
|
NodeResolutionFeatures[NodeResolutionFeatures["Exports"] = 8] = "Exports";
|
|
34365
34384
|
NodeResolutionFeatures[NodeResolutionFeatures["ExportsPatternTrailers"] = 16] = "ExportsPatternTrailers";
|
|
34366
34385
|
NodeResolutionFeatures[NodeResolutionFeatures["AllFeatures"] = 30] = "AllFeatures";
|
|
34386
|
+
NodeResolutionFeatures[NodeResolutionFeatures["Node12Default"] = 14] = "Node12Default";
|
|
34387
|
+
NodeResolutionFeatures[NodeResolutionFeatures["NodeNextDefault"] = 30] = "NodeNextDefault";
|
|
34367
34388
|
NodeResolutionFeatures[NodeResolutionFeatures["EsmMode"] = 32] = "EsmMode";
|
|
34368
34389
|
})(NodeResolutionFeatures || (NodeResolutionFeatures = {}));
|
|
34369
34390
|
function node12ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
34370
|
-
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.
|
|
34391
|
+
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.Node12Default, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
34371
34392
|
}
|
|
34372
34393
|
function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
34373
|
-
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.
|
|
34394
|
+
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.NodeNextDefault, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
34374
34395
|
}
|
|
34375
34396
|
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
34376
34397
|
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
@@ -36810,10 +36831,6 @@ var ts;
|
|
|
36810
36831
|
seen.set(identifier.escapedText, currentKind);
|
|
36811
36832
|
continue;
|
|
36812
36833
|
}
|
|
36813
|
-
if (currentKind === 1 && existingKind === 1) {
|
|
36814
|
-
var span = ts.getErrorSpanForNode(file, identifier);
|
|
36815
|
-
file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode));
|
|
36816
|
-
}
|
|
36817
36834
|
}
|
|
36818
36835
|
}
|
|
36819
36836
|
return bindAnonymousDeclaration(node, 4096, "__object");
|
|
@@ -37018,7 +37035,7 @@ var ts;
|
|
|
37018
37035
|
}
|
|
37019
37036
|
}
|
|
37020
37037
|
function checkStrictModeNumericLiteral(node) {
|
|
37021
|
-
if (inStrictMode && node.numericLiteralFlags & 32) {
|
|
37038
|
+
if (languageVersion < 1 && inStrictMode && node.numericLiteralFlags & 32) {
|
|
37022
37039
|
file.bindDiagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode));
|
|
37023
37040
|
}
|
|
37024
37041
|
}
|
|
@@ -38297,6 +38314,7 @@ var ts;
|
|
|
38297
38314
|
getIndexInfosOfType: getIndexInfosOfType,
|
|
38298
38315
|
getSignaturesOfType: getSignaturesOfType,
|
|
38299
38316
|
getIndexTypeOfType: function (type, kind) { return getIndexTypeOfType(type, kind === 0 ? stringType : numberType); },
|
|
38317
|
+
getIndexType: function (type) { return getIndexType(type); },
|
|
38300
38318
|
getBaseTypes: getBaseTypes,
|
|
38301
38319
|
getBaseTypeOfLiteralType: getBaseTypeOfLiteralType,
|
|
38302
38320
|
getWidenedType: getWidenedType,
|
|
@@ -39447,11 +39465,12 @@ var ts;
|
|
|
39447
39465
|
}
|
|
39448
39466
|
}
|
|
39449
39467
|
}
|
|
39450
|
-
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals) {
|
|
39468
|
+
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggstions) {
|
|
39451
39469
|
if (excludeGlobals === void 0) { excludeGlobals = false; }
|
|
39452
|
-
|
|
39470
|
+
if (getSpellingSuggstions === void 0) { getSpellingSuggstions = true; }
|
|
39471
|
+
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggstions, getSymbol);
|
|
39453
39472
|
}
|
|
39454
|
-
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup) {
|
|
39473
|
+
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, lookup) {
|
|
39455
39474
|
var _a, _b, _c;
|
|
39456
39475
|
var originalLocation = location;
|
|
39457
39476
|
var result;
|
|
@@ -39686,7 +39705,7 @@ var ts;
|
|
|
39686
39705
|
}
|
|
39687
39706
|
}
|
|
39688
39707
|
if (!result) {
|
|
39689
|
-
if (nameNotFoundMessage) {
|
|
39708
|
+
if (nameNotFoundMessage && produceDiagnostics) {
|
|
39690
39709
|
if (!errorLocation ||
|
|
39691
39710
|
!checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) &&
|
|
39692
39711
|
!checkAndReportErrorForExtendingInterface(errorLocation) &&
|
|
@@ -39696,7 +39715,7 @@ var ts;
|
|
|
39696
39715
|
!checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) &&
|
|
39697
39716
|
!checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) {
|
|
39698
39717
|
var suggestion = void 0;
|
|
39699
|
-
if (suggestionCount < maximumSuggestionCount) {
|
|
39718
|
+
if (getSpellingSuggestions && suggestionCount < maximumSuggestionCount) {
|
|
39700
39719
|
suggestion = getSuggestedSymbolForNonexistentSymbol(originalLocation, name, meaning);
|
|
39701
39720
|
var isGlobalScopeAugmentationDeclaration = (suggestion === null || suggestion === void 0 ? void 0 : suggestion.valueDeclaration) && ts.isAmbientModule(suggestion.valueDeclaration) && ts.isGlobalScopeAugmentation(suggestion.valueDeclaration);
|
|
39702
39721
|
if (isGlobalScopeAugmentationDeclaration) {
|
|
@@ -39731,7 +39750,7 @@ var ts;
|
|
|
39731
39750
|
}
|
|
39732
39751
|
return undefined;
|
|
39733
39752
|
}
|
|
39734
|
-
if (nameNotFoundMessage) {
|
|
39753
|
+
if (nameNotFoundMessage && produceDiagnostics) {
|
|
39735
39754
|
if (propertyWithInvalidInitializer && !(ts.getEmitScriptTarget(compilerOptions) === 99 && useDefineForClassFields)) {
|
|
39736
39755
|
var propertyName = propertyWithInvalidInitializer.name;
|
|
39737
39756
|
error(errorLocation, ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.declarationNameToString(propertyName), diagnosticName(nameArg));
|
|
@@ -40013,7 +40032,8 @@ var ts;
|
|
|
40013
40032
|
}
|
|
40014
40033
|
}
|
|
40015
40034
|
function isSameScopeDescendentOf(initial, parent, stopAt) {
|
|
40016
|
-
return !!parent && !!ts.findAncestor(initial, function (n) { return n ===
|
|
40035
|
+
return !!parent && !!ts.findAncestor(initial, function (n) { return n === parent
|
|
40036
|
+
|| (n === stopAt || ts.isFunctionLike(n) && !ts.getImmediatelyInvokedFunctionExpression(n) ? "quit" : false); });
|
|
40017
40037
|
}
|
|
40018
40038
|
function getAnyImportSyntax(node) {
|
|
40019
40039
|
switch (node.kind) {
|
|
@@ -41923,7 +41943,7 @@ var ts;
|
|
|
41923
41943
|
context.approximateLength += 6;
|
|
41924
41944
|
return ts.factory.createKeywordTypeNode(147);
|
|
41925
41945
|
}
|
|
41926
|
-
if (isThisTypeParameter(type)) {
|
|
41946
|
+
if (ts.isThisTypeParameter(type)) {
|
|
41927
41947
|
if (context.flags & 4194304) {
|
|
41928
41948
|
if (!context.encounteredError && !(context.flags & 32768)) {
|
|
41929
41949
|
context.encounteredError = true;
|
|
@@ -48811,7 +48831,7 @@ var ts;
|
|
|
48811
48831
|
return symbol;
|
|
48812
48832
|
}
|
|
48813
48833
|
function getGlobalSymbol(name, meaning, diagnostic) {
|
|
48814
|
-
return resolveName(undefined, name, meaning, diagnostic, name, false);
|
|
48834
|
+
return resolveName(undefined, name, meaning, diagnostic, name, false, false, false);
|
|
48815
48835
|
}
|
|
48816
48836
|
function getGlobalType(name, arity, reportErrors) {
|
|
48817
48837
|
var symbol = getGlobalTypeSymbol(name, reportErrors);
|
|
@@ -50240,9 +50260,6 @@ var ts;
|
|
|
50240
50260
|
return (type.flags & 58982400 || isGenericMappedType(type) || isGenericTupleType(type) ? 8388608 : 0) |
|
|
50241
50261
|
(type.flags & (58982400 | 4194304 | 134217728 | 268435456) && !isPatternLiteralType(type) ? 16777216 : 0);
|
|
50242
50262
|
}
|
|
50243
|
-
function isThisTypeParameter(type) {
|
|
50244
|
-
return !!(type.flags & 262144 && type.isThisType);
|
|
50245
|
-
}
|
|
50246
50263
|
function getSimplifiedType(type, writing) {
|
|
50247
50264
|
return type.flags & 8388608 ? getSimplifiedIndexedAccessType(type, writing) :
|
|
50248
50265
|
type.flags & 16777216 ? getSimplifiedConditionalType(type, writing) :
|
|
@@ -54650,7 +54667,7 @@ var ts;
|
|
|
54650
54667
|
}
|
|
54651
54668
|
function getBaseTypeOfLiteralType(type) {
|
|
54652
54669
|
return type.flags & 1024 ? getBaseTypeOfEnumLiteralType(type) :
|
|
54653
|
-
type.flags & 128 ? stringType :
|
|
54670
|
+
type.flags & (128 | 134217728 | 268435456) ? stringType :
|
|
54654
54671
|
type.flags & 256 ? numberType :
|
|
54655
54672
|
type.flags & 2048 ? bigintType :
|
|
54656
54673
|
type.flags & 512 ? booleanType :
|
|
@@ -54742,7 +54759,7 @@ var ts;
|
|
|
54742
54759
|
return result;
|
|
54743
54760
|
}
|
|
54744
54761
|
function getFalsyFlags(type) {
|
|
54745
|
-
return type.flags &
|
|
54762
|
+
return type.flags & 3145728 ? getFalsyFlagsOfTypes(type.types) :
|
|
54746
54763
|
type.flags & 128 ? type.value === "" ? 128 : 0 :
|
|
54747
54764
|
type.flags & 256 ? type.value === 0 ? 256 : 0 :
|
|
54748
54765
|
type.flags & 2048 ? isZeroBigInt(type) ? 2048 : 0 :
|
|
@@ -56130,6 +56147,10 @@ var ts;
|
|
|
56130
56147
|
case "BigInt64Array":
|
|
56131
56148
|
case "BigUint64Array":
|
|
56132
56149
|
return ts.Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later;
|
|
56150
|
+
case "await":
|
|
56151
|
+
if (ts.isCallExpression(node.parent)) {
|
|
56152
|
+
return ts.Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function;
|
|
56153
|
+
}
|
|
56133
56154
|
default:
|
|
56134
56155
|
if (node.parent.kind === 295) {
|
|
56135
56156
|
return ts.Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer;
|
|
@@ -57534,7 +57555,7 @@ var ts;
|
|
|
57534
57555
|
function narrowByInKeyword(type, name, assumeTrue) {
|
|
57535
57556
|
if (type.flags & 1048576
|
|
57536
57557
|
|| type.flags & 524288 && declaredType !== type
|
|
57537
|
-
|| isThisTypeParameter(type)
|
|
57558
|
+
|| ts.isThisTypeParameter(type)
|
|
57538
57559
|
|| type.flags & 2097152 && ts.every(type.types, function (t) { return t.symbol !== globalThisSymbol; })) {
|
|
57539
57560
|
return filterType(type, function (t) { return isTypePresencePossible(t, name, assumeTrue); });
|
|
57540
57561
|
}
|
|
@@ -59872,15 +59893,9 @@ var ts;
|
|
|
59872
59893
|
}
|
|
59873
59894
|
}
|
|
59874
59895
|
function isValidSpreadType(type) {
|
|
59875
|
-
|
|
59876
|
-
|
|
59877
|
-
|
|
59878
|
-
return isValidSpreadType(constraint);
|
|
59879
|
-
}
|
|
59880
|
-
}
|
|
59881
|
-
return !!(type.flags & (1 | 67108864 | 524288 | 58982400) ||
|
|
59882
|
-
getFalsyFlags(type) & 117632 && isValidSpreadType(removeDefinitelyFalsyTypes(type)) ||
|
|
59883
|
-
type.flags & 3145728 && ts.every(type.types, isValidSpreadType));
|
|
59896
|
+
var t = removeDefinitelyFalsyTypes(mapType(type, getBaseConstraintOrType));
|
|
59897
|
+
return !!(t.flags & (1 | 67108864 | 524288 | 58982400) ||
|
|
59898
|
+
t.flags & 3145728 && ts.every(t.types, isValidSpreadType));
|
|
59884
59899
|
}
|
|
59885
59900
|
function checkJsxSelfClosingElementDeferred(node) {
|
|
59886
59901
|
checkJsxOpeningLikeElementOrOpeningFragment(node);
|
|
@@ -60666,7 +60681,7 @@ var ts;
|
|
|
60666
60681
|
}
|
|
60667
60682
|
var propType;
|
|
60668
60683
|
if (!prop) {
|
|
60669
|
-
var indexInfo = !ts.isPrivateIdentifier(right) && (assignmentKind === 0 || !isGenericObjectType(leftType) || isThisTypeParameter(leftType)) ?
|
|
60684
|
+
var indexInfo = !ts.isPrivateIdentifier(right) && (assignmentKind === 0 || !isGenericObjectType(leftType) || ts.isThisTypeParameter(leftType)) ?
|
|
60670
60685
|
getApplicableIndexInfoForName(apparentType, right.escapedText) : undefined;
|
|
60671
60686
|
if (!(indexInfo && indexInfo.type)) {
|
|
60672
60687
|
var isUncheckedJS = isUncheckedJSSuggestion(node, leftType.symbol, true);
|
|
@@ -60683,7 +60698,7 @@ var ts;
|
|
|
60683
60698
|
return anyType;
|
|
60684
60699
|
}
|
|
60685
60700
|
if (right.escapedText && !checkAndReportErrorForExtendingInterface(node)) {
|
|
60686
|
-
reportNonexistentProperty(right, isThisTypeParameter(leftType) ? apparentType : leftType, isUncheckedJS);
|
|
60701
|
+
reportNonexistentProperty(right, ts.isThisTypeParameter(leftType) ? apparentType : leftType, isUncheckedJS);
|
|
60687
60702
|
}
|
|
60688
60703
|
return errorType;
|
|
60689
60704
|
}
|
|
@@ -60957,7 +60972,7 @@ var ts;
|
|
|
60957
60972
|
}
|
|
60958
60973
|
function getSuggestedSymbolForNonexistentSymbol(location, outerName, meaning) {
|
|
60959
60974
|
ts.Debug.assert(outerName !== undefined, "outername should always be defined");
|
|
60960
|
-
var result = resolveNameHelper(location, outerName, meaning, undefined, outerName, false, false, function (symbols, name, meaning) {
|
|
60975
|
+
var result = resolveNameHelper(location, outerName, meaning, undefined, outerName, false, false, true, function (symbols, name, meaning) {
|
|
60961
60976
|
ts.Debug.assertEqual(outerName, name, "name should equal outerName");
|
|
60962
60977
|
var symbol = getSymbol(symbols, name, meaning);
|
|
60963
60978
|
if (symbol)
|
|
@@ -61147,7 +61162,7 @@ var ts;
|
|
|
61147
61162
|
}
|
|
61148
61163
|
var effectiveIndexType = isForInVariableForNumericPropertyNames(indexExpression) ? numberType : indexType;
|
|
61149
61164
|
var accessFlags = ts.isAssignmentTarget(node) ?
|
|
61150
|
-
4 | (isGenericObjectType(objectType) && !isThisTypeParameter(objectType) ? 2 : 0) :
|
|
61165
|
+
4 | (isGenericObjectType(objectType) && !ts.isThisTypeParameter(objectType) ? 2 : 0) :
|
|
61151
61166
|
32;
|
|
61152
61167
|
var indexedAccessType = getIndexedAccessTypeOrUndefined(objectType, effectiveIndexType, accessFlags, node) || errorType;
|
|
61153
61168
|
return checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, getNodeLinks(node).resolvedSymbol, indexedAccessType, indexExpression, checkMode), node);
|
|
@@ -72212,9 +72227,12 @@ var ts;
|
|
|
72212
72227
|
seen.set(effectiveName, currentKind);
|
|
72213
72228
|
}
|
|
72214
72229
|
else {
|
|
72215
|
-
if ((currentKind &
|
|
72230
|
+
if ((currentKind & 8) && (existingKind & 8)) {
|
|
72216
72231
|
grammarErrorOnNode(name, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(name));
|
|
72217
72232
|
}
|
|
72233
|
+
else if ((currentKind & 4) && (existingKind & 4)) {
|
|
72234
|
+
grammarErrorOnNode(name, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name, ts.getTextOfNode(name));
|
|
72235
|
+
}
|
|
72218
72236
|
else if ((currentKind & 3) && (existingKind & 3)) {
|
|
72219
72237
|
if (existingKind !== 3 && currentKind !== existingKind) {
|
|
72220
72238
|
seen.set(effectiveName, currentKind | existingKind);
|