typescript 5.3.0-dev.20230929 → 5.3.0-dev.20230930
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 +138 -30
- package/lib/tsserver.js +159 -45
- package/lib/typescript.d.ts +4 -1
- package/lib/typescript.js +156 -44
- package/lib/typingsInstaller.js +6 -5
- package/package.json +2 -2
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.3";
|
|
38
|
-
version = `${versionMajorMinor}.0-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20230930`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -7512,7 +7512,7 @@ ${lanes.join("\n")}
|
|
|
7512
7512
|
An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2356, 1 /* Error */, "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356", "An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."),
|
|
7513
7513
|
The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access: diag(2357, 1 /* Error */, "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357", "The operand of an increment or decrement operator must be a variable or a property access."),
|
|
7514
7514
|
The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: diag(2358, 1 /* Error */, "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358", "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."),
|
|
7515
|
-
|
|
7515
|
+
The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method: diag(2359, 1 /* Error */, "The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_2359", "The right-hand side of an 'instanceof' expression must be either of type 'any', a class, function, or other type assignable to the 'Function' interface type, or an object type with a 'Symbol.hasInstance' method."),
|
|
7516
7516
|
The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2362, 1 /* Error */, "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362", "The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),
|
|
7517
7517
|
The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2363, 1 /* Error */, "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363", "The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),
|
|
7518
7518
|
The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access: diag(2364, 1 /* Error */, "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364", "The left-hand side of an assignment expression must be a variable or a property access."),
|
|
@@ -7961,6 +7961,8 @@ ${lanes.join("\n")}
|
|
|
7961
7961
|
Import_attributes_cannot_be_used_with_type_only_imports_or_exports: diag(2857, 1 /* Error */, "Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857", "Import attributes cannot be used with type-only imports or exports."),
|
|
7962
7962
|
Import_attribute_values_must_be_string_literal_expressions: diag(2858, 1 /* Error */, "Import_attribute_values_must_be_string_literal_expressions_2858", "Import attribute values must be string literal expressions."),
|
|
7963
7963
|
Excessive_complexity_comparing_types_0_and_1: diag(2859, 1 /* Error */, "Excessive_complexity_comparing_types_0_and_1_2859", "Excessive complexity comparing types '{0}' and '{1}'."),
|
|
7964
|
+
The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method: diag(2860, 1 /* Error */, "The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860", "The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."),
|
|
7965
|
+
An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression: diag(2861, 1 /* Error */, "An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861", "An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."),
|
|
7964
7966
|
Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* Error */, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
7965
7967
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, 1 /* Error */, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
7966
7968
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, 1 /* Error */, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -12273,7 +12275,14 @@ ${lanes.join("\n")}
|
|
|
12273
12275
|
function isAutoAccessorPropertyDeclaration(node) {
|
|
12274
12276
|
return isPropertyDeclaration(node) && hasAccessorModifier(node);
|
|
12275
12277
|
}
|
|
12276
|
-
function
|
|
12278
|
+
function isClassInstanceProperty(node) {
|
|
12279
|
+
if (isInJSFile(node) && isExpandoPropertyDeclaration(node)) {
|
|
12280
|
+
return (!isBindableStaticAccessExpression(node) || !isPrototypeAccess(node.expression)) && !isBindableStaticNameExpression(
|
|
12281
|
+
node,
|
|
12282
|
+
/*excludeThisKeyword*/
|
|
12283
|
+
true
|
|
12284
|
+
);
|
|
12285
|
+
}
|
|
12277
12286
|
return node.parent && isClassLike(node.parent) && isPropertyDeclaration(node) && !hasAccessorModifier(node);
|
|
12278
12287
|
}
|
|
12279
12288
|
function isMethodOrAccessor(node) {
|
|
@@ -14300,6 +14309,8 @@ ${lanes.join("\n")}
|
|
|
14300
14309
|
case 286 /* JsxOpeningElement */:
|
|
14301
14310
|
case 285 /* JsxSelfClosingElement */:
|
|
14302
14311
|
return node.tagName;
|
|
14312
|
+
case 226 /* BinaryExpression */:
|
|
14313
|
+
return node.right;
|
|
14303
14314
|
default:
|
|
14304
14315
|
return node.expression;
|
|
14305
14316
|
}
|
|
@@ -16877,6 +16888,12 @@ ${lanes.join("\n")}
|
|
|
16877
16888
|
function isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(node) {
|
|
16878
16889
|
return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node || isJSDocMemberName(node.parent) && node.parent.right === node;
|
|
16879
16890
|
}
|
|
16891
|
+
function isInstanceOfExpression(node) {
|
|
16892
|
+
return isBinaryExpression(node) && node.operatorToken.kind === 104 /* InstanceOfKeyword */;
|
|
16893
|
+
}
|
|
16894
|
+
function isRightSideOfInstanceofExpression(node) {
|
|
16895
|
+
return isInstanceOfExpression(node.parent) && node === node.parent.right;
|
|
16896
|
+
}
|
|
16880
16897
|
function isEmptyObjectLiteral(expression) {
|
|
16881
16898
|
return expression.kind === 210 /* ObjectLiteralExpression */ && expression.properties.length === 0;
|
|
16882
16899
|
}
|
|
@@ -46036,7 +46053,7 @@ ${lanes.join("\n")}
|
|
|
46036
46053
|
candidates,
|
|
46037
46054
|
/*argumentCount*/
|
|
46038
46055
|
void 0,
|
|
46039
|
-
|
|
46056
|
+
0 /* Normal */
|
|
46040
46057
|
));
|
|
46041
46058
|
for (const candidate of candidates) {
|
|
46042
46059
|
candidatesSet.add(candidate);
|
|
@@ -54071,7 +54088,7 @@ ${lanes.join("\n")}
|
|
|
54071
54088
|
return type.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */) ? "" + type.value : void 0;
|
|
54072
54089
|
}
|
|
54073
54090
|
function getTypeForBindingElement(declaration) {
|
|
54074
|
-
const checkMode = declaration.dotDotDotToken ?
|
|
54091
|
+
const checkMode = declaration.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */;
|
|
54075
54092
|
const parentType = getTypeForBindingElementParent(declaration.parent.parent, checkMode);
|
|
54076
54093
|
return parentType && getBindingElementTypeFromParentType(
|
|
54077
54094
|
declaration,
|
|
@@ -66238,7 +66255,7 @@ ${lanes.join("\n")}
|
|
|
66238
66255
|
if (!couldContainTypeVariables(target)) {
|
|
66239
66256
|
return;
|
|
66240
66257
|
}
|
|
66241
|
-
if (source === wildcardType) {
|
|
66258
|
+
if (source === wildcardType || source === blockedStringType) {
|
|
66242
66259
|
const savePropagationType = propagationType;
|
|
66243
66260
|
propagationType = source;
|
|
66244
66261
|
inferFromTypes(target, target);
|
|
@@ -66295,6 +66312,10 @@ ${lanes.join("\n")}
|
|
|
66295
66312
|
return;
|
|
66296
66313
|
}
|
|
66297
66314
|
if (!inference.isFixed) {
|
|
66315
|
+
const candidate = propagationType || source;
|
|
66316
|
+
if (candidate === blockedStringType) {
|
|
66317
|
+
return;
|
|
66318
|
+
}
|
|
66298
66319
|
if (inference.priority === void 0 || priority < inference.priority) {
|
|
66299
66320
|
inference.candidates = void 0;
|
|
66300
66321
|
inference.contraCandidates = void 0;
|
|
@@ -66302,7 +66323,6 @@ ${lanes.join("\n")}
|
|
|
66302
66323
|
inference.priority = priority;
|
|
66303
66324
|
}
|
|
66304
66325
|
if (priority === inference.priority) {
|
|
66305
|
-
const candidate = propagationType || source;
|
|
66306
66326
|
if (contravariant && !bivariant) {
|
|
66307
66327
|
if (!contains(inference.contraCandidates, candidate)) {
|
|
66308
66328
|
inference.contraCandidates = append(inference.contraCandidates, candidate);
|
|
@@ -66874,7 +66894,7 @@ ${lanes.join("\n")}
|
|
|
66874
66894
|
const constraint = getConstraintOfTypeParameter(inference.typeParameter);
|
|
66875
66895
|
if (constraint) {
|
|
66876
66896
|
const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper);
|
|
66877
|
-
if (!inferredType ||
|
|
66897
|
+
if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
|
|
66878
66898
|
inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint;
|
|
66879
66899
|
}
|
|
66880
66900
|
}
|
|
@@ -67725,7 +67745,10 @@ ${lanes.join("\n")}
|
|
|
67725
67745
|
let signature = links.effectsSignature;
|
|
67726
67746
|
if (signature === void 0) {
|
|
67727
67747
|
let funcType;
|
|
67728
|
-
if (node
|
|
67748
|
+
if (isBinaryExpression(node)) {
|
|
67749
|
+
const rightType = checkNonNullExpression(node.right);
|
|
67750
|
+
funcType = getSymbolHasInstanceMethodOfObjectType(rightType);
|
|
67751
|
+
} else if (node.parent.kind === 244 /* ExpressionStatement */) {
|
|
67729
67752
|
funcType = getTypeOfDottedName(
|
|
67730
67753
|
node.expression,
|
|
67731
67754
|
/*diagnostic*/
|
|
@@ -68749,7 +68772,22 @@ ${lanes.join("\n")}
|
|
|
68749
68772
|
}
|
|
68750
68773
|
return type;
|
|
68751
68774
|
}
|
|
68752
|
-
const
|
|
68775
|
+
const right = expr.right;
|
|
68776
|
+
const rightType = getTypeOfExpression(right);
|
|
68777
|
+
if (!isTypeDerivedFrom(rightType, globalObjectType)) {
|
|
68778
|
+
return type;
|
|
68779
|
+
}
|
|
68780
|
+
const signature = getEffectsSignature(expr);
|
|
68781
|
+
const predicate = signature && getTypePredicateOfSignature(signature);
|
|
68782
|
+
if (predicate && predicate.kind === 1 /* Identifier */ && predicate.parameterIndex === 0) {
|
|
68783
|
+
return getNarrowedType(
|
|
68784
|
+
type,
|
|
68785
|
+
predicate.type,
|
|
68786
|
+
assumeTrue,
|
|
68787
|
+
/*checkDerived*/
|
|
68788
|
+
true
|
|
68789
|
+
);
|
|
68790
|
+
}
|
|
68753
68791
|
if (!isTypeDerivedFrom(rightType, globalFunctionType)) {
|
|
68754
68792
|
return type;
|
|
68755
68793
|
}
|
|
@@ -69001,7 +69039,7 @@ ${lanes.join("\n")}
|
|
|
69001
69039
|
return type.flags & 2097152 /* Intersection */ ? some(type.types, isGenericTypeWithoutNullableConstraint) : !!(type.flags & 465829888 /* Instantiable */ && !maybeTypeOfKind(getBaseConstraintOrType(type), 98304 /* Nullable */));
|
|
69002
69040
|
}
|
|
69003
69041
|
function hasContextualTypeWithNoGenericTypes(node, checkMode) {
|
|
69004
|
-
const contextualType = (isIdentifier(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node)) && !((isJsxOpeningElement(node.parent) || isJsxSelfClosingElement(node.parent)) && node.parent.tagName === node) && (checkMode && checkMode &
|
|
69042
|
+
const contextualType = (isIdentifier(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node)) && !((isJsxOpeningElement(node.parent) || isJsxSelfClosingElement(node.parent)) && node.parent.tagName === node) && (checkMode && checkMode & 32 /* RestBindingElement */ ? getContextualType2(node, 8 /* SkipBindingPatterns */) : getContextualType2(
|
|
69005
69043
|
node,
|
|
69006
69044
|
/*contextFlags*/
|
|
69007
69045
|
void 0
|
|
@@ -69761,7 +69799,7 @@ ${lanes.join("\n")}
|
|
|
69761
69799
|
function getContextualTypeForBindingElement(declaration, contextFlags) {
|
|
69762
69800
|
const parent2 = declaration.parent.parent;
|
|
69763
69801
|
const name = declaration.propertyName || declaration.name;
|
|
69764
|
-
const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 208 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ?
|
|
69802
|
+
const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 208 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */);
|
|
69765
69803
|
if (!parentType || isBindingPattern(name) || isComputedNonLiteralName(name))
|
|
69766
69804
|
return void 0;
|
|
69767
69805
|
if (parent2.name.kind === 207 /* ArrayBindingPattern */) {
|
|
@@ -71744,7 +71782,7 @@ ${lanes.join("\n")}
|
|
|
71744
71782
|
}
|
|
71745
71783
|
return false;
|
|
71746
71784
|
}
|
|
71747
|
-
if (!(flags & 32 /* Static */) && ((_a = prop.declarations) == null ? void 0 : _a.some(
|
|
71785
|
+
if (!(flags & 32 /* Static */) && ((_a = prop.declarations) == null ? void 0 : _a.some(isClassInstanceProperty))) {
|
|
71748
71786
|
if (errorNode) {
|
|
71749
71787
|
error2(errorNode, Diagnostics.Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super, symbolToString(prop));
|
|
71750
71788
|
}
|
|
@@ -72607,7 +72645,9 @@ ${lanes.join("\n")}
|
|
|
72607
72645
|
checkExpression(node.template);
|
|
72608
72646
|
} else if (isJsxOpeningLikeElement(node)) {
|
|
72609
72647
|
checkExpression(node.attributes);
|
|
72610
|
-
} else if (node
|
|
72648
|
+
} else if (isBinaryExpression(node)) {
|
|
72649
|
+
checkExpression(node.left);
|
|
72650
|
+
} else if (isCallOrNewExpression(node)) {
|
|
72611
72651
|
forEach(node.arguments, (argument) => {
|
|
72612
72652
|
checkExpression(argument);
|
|
72613
72653
|
});
|
|
@@ -72680,6 +72720,8 @@ ${lanes.join("\n")}
|
|
|
72680
72720
|
}
|
|
72681
72721
|
} else if (node.kind === 170 /* Decorator */) {
|
|
72682
72722
|
argCount = getDecoratorArgumentCount(node, signature);
|
|
72723
|
+
} else if (node.kind === 226 /* BinaryExpression */) {
|
|
72724
|
+
argCount = 1;
|
|
72683
72725
|
} else if (isJsxOpeningLikeElement(node)) {
|
|
72684
72726
|
callIsIncomplete = node.attributes.end === node.end;
|
|
72685
72727
|
if (callIsIncomplete) {
|
|
@@ -72779,13 +72821,13 @@ ${lanes.join("\n")}
|
|
|
72779
72821
|
return voidType;
|
|
72780
72822
|
}
|
|
72781
72823
|
const thisArgumentType = checkExpression(thisArgumentNode);
|
|
72782
|
-
return isOptionalChainRoot(thisArgumentNode.parent) ? getNonNullableType(thisArgumentType) : isOptionalChain(thisArgumentNode.parent) ? removeOptionalTypeMarker(thisArgumentType) : thisArgumentType;
|
|
72824
|
+
return isRightSideOfInstanceofExpression(thisArgumentNode) ? thisArgumentType : isOptionalChainRoot(thisArgumentNode.parent) ? getNonNullableType(thisArgumentType) : isOptionalChain(thisArgumentNode.parent) ? removeOptionalTypeMarker(thisArgumentType) : thisArgumentType;
|
|
72783
72825
|
}
|
|
72784
72826
|
function inferTypeArguments(node, signature, args, checkMode, context) {
|
|
72785
72827
|
if (isJsxOpeningLikeElement(node)) {
|
|
72786
72828
|
return inferJsxTypeArguments(node, signature, checkMode, context);
|
|
72787
72829
|
}
|
|
72788
|
-
if (node.kind !== 170 /* Decorator */) {
|
|
72830
|
+
if (node.kind !== 170 /* Decorator */ && node.kind !== 226 /* BinaryExpression */) {
|
|
72789
72831
|
const skipBindingPatterns = every(signature.typeParameters, (p) => !!getDefaultFromTypeParameter(p));
|
|
72790
72832
|
const contextualType = getContextualType2(node, skipBindingPatterns ? 8 /* SkipBindingPatterns */ : 0 /* None */);
|
|
72791
72833
|
if (contextualType) {
|
|
@@ -72822,7 +72864,7 @@ ${lanes.join("\n")}
|
|
|
72822
72864
|
}
|
|
72823
72865
|
for (let i = 0; i < argCount; i++) {
|
|
72824
72866
|
const arg = args[i];
|
|
72825
|
-
if (arg.kind !== 232 /* OmittedExpression */
|
|
72867
|
+
if (arg.kind !== 232 /* OmittedExpression */) {
|
|
72826
72868
|
const paramType = getTypeAtPosition(signature, i);
|
|
72827
72869
|
if (couldContainTypeVariables(paramType)) {
|
|
72828
72870
|
const argType = checkExpressionWithContextualType(arg, paramType, context, checkMode);
|
|
@@ -73114,6 +73156,9 @@ ${lanes.join("\n")}
|
|
|
73114
73156
|
}
|
|
73115
73157
|
}
|
|
73116
73158
|
function getThisArgumentOfCall(node) {
|
|
73159
|
+
if (node.kind === 226 /* BinaryExpression */) {
|
|
73160
|
+
return node.right;
|
|
73161
|
+
}
|
|
73117
73162
|
const expression = node.kind === 213 /* CallExpression */ ? node.expression : node.kind === 215 /* TaggedTemplateExpression */ ? node.tag : node.kind === 170 /* Decorator */ && !legacyDecorators ? node.expression : void 0;
|
|
73118
73163
|
if (expression) {
|
|
73119
73164
|
const callee = skipOuterExpressions(expression);
|
|
@@ -73142,6 +73187,9 @@ ${lanes.join("\n")}
|
|
|
73142
73187
|
if (node.kind === 170 /* Decorator */) {
|
|
73143
73188
|
return getEffectiveDecoratorArguments(node);
|
|
73144
73189
|
}
|
|
73190
|
+
if (node.kind === 226 /* BinaryExpression */) {
|
|
73191
|
+
return [node.left];
|
|
73192
|
+
}
|
|
73145
73193
|
if (isJsxOpeningLikeElement(node)) {
|
|
73146
73194
|
return node.attributes.properties.length > 0 || isJsxOpeningElement(node) && node.parent.children.length > 0 ? [node.attributes] : emptyArray;
|
|
73147
73195
|
}
|
|
@@ -73411,9 +73459,10 @@ ${lanes.join("\n")}
|
|
|
73411
73459
|
const isTaggedTemplate = node.kind === 215 /* TaggedTemplateExpression */;
|
|
73412
73460
|
const isDecorator2 = node.kind === 170 /* Decorator */;
|
|
73413
73461
|
const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node);
|
|
73462
|
+
const isInstanceof = node.kind === 226 /* BinaryExpression */;
|
|
73414
73463
|
const reportErrors2 = !isInferencePartiallyBlocked && !candidatesOutArray;
|
|
73415
73464
|
let typeArguments;
|
|
73416
|
-
if (!isDecorator2 && !isSuperCall(node)) {
|
|
73465
|
+
if (!isDecorator2 && !isInstanceof && !isSuperCall(node)) {
|
|
73417
73466
|
typeArguments = node.typeArguments;
|
|
73418
73467
|
if (isTaggedTemplate || isJsxOpeningOrSelfClosingElement || node.expression.kind !== 108 /* SuperKeyword */) {
|
|
73419
73468
|
forEach(typeArguments, checkSourceElement);
|
|
@@ -73425,7 +73474,6 @@ ${lanes.join("\n")}
|
|
|
73425
73474
|
const args = getEffectiveCallArguments(node);
|
|
73426
73475
|
const isSingleNonGenericCandidate = candidates.length === 1 && !candidates[0].typeParameters;
|
|
73427
73476
|
let argCheckMode = !isDecorator2 && !isSingleNonGenericCandidate && some(args, isContextSensitive) ? 4 /* SkipContextSensitive */ : 0 /* Normal */;
|
|
73428
|
-
argCheckMode |= checkMode & 32 /* IsForStringLiteralArgumentCompletions */;
|
|
73429
73477
|
let candidatesForArgumentError;
|
|
73430
73478
|
let candidateForArgumentArityError;
|
|
73431
73479
|
let candidateForTypeArgumentError;
|
|
@@ -73443,6 +73491,9 @@ ${lanes.join("\n")}
|
|
|
73443
73491
|
result = getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray, checkMode);
|
|
73444
73492
|
getNodeLinks(node).resolvedSignature = result;
|
|
73445
73493
|
if (reportErrors2) {
|
|
73494
|
+
if (!headMessage && isInstanceof) {
|
|
73495
|
+
headMessage = Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method;
|
|
73496
|
+
}
|
|
73446
73497
|
if (candidatesForArgumentError) {
|
|
73447
73498
|
if (candidatesForArgumentError.length === 1 || candidatesForArgumentError.length > 3) {
|
|
73448
73499
|
const last2 = candidatesForArgumentError[candidatesForArgumentError.length - 1];
|
|
@@ -74229,6 +74280,30 @@ ${lanes.join("\n")}
|
|
|
74229
74280
|
}
|
|
74230
74281
|
return resolveCall(node, signatures, candidatesOutArray, checkMode, 0 /* None */);
|
|
74231
74282
|
}
|
|
74283
|
+
function resolveInstanceofExpression(node, candidatesOutArray, checkMode) {
|
|
74284
|
+
const rightType = checkExpression(node.right);
|
|
74285
|
+
if (!isTypeAny(rightType)) {
|
|
74286
|
+
const hasInstanceMethodType = getSymbolHasInstanceMethodOfObjectType(rightType);
|
|
74287
|
+
if (hasInstanceMethodType) {
|
|
74288
|
+
const apparentType = getApparentType(hasInstanceMethodType);
|
|
74289
|
+
if (isErrorType(apparentType)) {
|
|
74290
|
+
return resolveErrorCall(node);
|
|
74291
|
+
}
|
|
74292
|
+
const callSignatures = getSignaturesOfType(apparentType, 0 /* Call */);
|
|
74293
|
+
const constructSignatures = getSignaturesOfType(apparentType, 1 /* Construct */);
|
|
74294
|
+
if (isUntypedFunctionCall(hasInstanceMethodType, apparentType, callSignatures.length, constructSignatures.length)) {
|
|
74295
|
+
return resolveUntypedCall(node);
|
|
74296
|
+
}
|
|
74297
|
+
if (callSignatures.length) {
|
|
74298
|
+
return resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */);
|
|
74299
|
+
}
|
|
74300
|
+
} else if (!(typeHasCallOrConstructSignatures(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) {
|
|
74301
|
+
error2(node.right, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method);
|
|
74302
|
+
return resolveErrorCall(node);
|
|
74303
|
+
}
|
|
74304
|
+
}
|
|
74305
|
+
return anySignature;
|
|
74306
|
+
}
|
|
74232
74307
|
function isPotentiallyUncalledDecorator(decorator, signatures) {
|
|
74233
74308
|
return signatures.length && every(signatures, (signature) => signature.minArgumentCount === 0 && !signatureHasRestParameter(signature) && signature.parameters.length < getDecoratorArgumentCount(decorator, signature));
|
|
74234
74309
|
}
|
|
@@ -74245,6 +74320,8 @@ ${lanes.join("\n")}
|
|
|
74245
74320
|
case 286 /* JsxOpeningElement */:
|
|
74246
74321
|
case 285 /* JsxSelfClosingElement */:
|
|
74247
74322
|
return resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode);
|
|
74323
|
+
case 226 /* BinaryExpression */:
|
|
74324
|
+
return resolveInstanceofExpression(node, candidatesOutArray, checkMode);
|
|
74248
74325
|
}
|
|
74249
74326
|
Debug.assertNever(node, "Branch in 'resolveSignature' should be unreachable.");
|
|
74250
74327
|
}
|
|
@@ -76203,16 +76280,35 @@ ${lanes.join("\n")}
|
|
|
76203
76280
|
function isConstEnumSymbol(symbol) {
|
|
76204
76281
|
return (symbol.flags & 128 /* ConstEnum */) !== 0;
|
|
76205
76282
|
}
|
|
76206
|
-
function
|
|
76283
|
+
function getSymbolHasInstanceMethodOfObjectType(type) {
|
|
76284
|
+
const hasInstancePropertyName = getPropertyNameForKnownSymbolName("hasInstance");
|
|
76285
|
+
const hasInstanceProperty = getPropertyOfObjectType(type, hasInstancePropertyName);
|
|
76286
|
+
if (hasInstanceProperty) {
|
|
76287
|
+
const hasInstancePropertyType = getTypeOfSymbol(hasInstanceProperty);
|
|
76288
|
+
if (hasInstancePropertyType && getSignaturesOfType(hasInstancePropertyType, 0 /* Call */).length !== 0) {
|
|
76289
|
+
return hasInstancePropertyType;
|
|
76290
|
+
}
|
|
76291
|
+
}
|
|
76292
|
+
}
|
|
76293
|
+
function checkInstanceOfExpression(left, right, leftType, rightType, checkMode) {
|
|
76207
76294
|
if (leftType === silentNeverType || rightType === silentNeverType) {
|
|
76208
76295
|
return silentNeverType;
|
|
76209
76296
|
}
|
|
76210
76297
|
if (!isTypeAny(leftType) && allTypesAssignableToKind(leftType, 402784252 /* Primitive */)) {
|
|
76211
76298
|
error2(left, Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter);
|
|
76212
76299
|
}
|
|
76213
|
-
|
|
76214
|
-
|
|
76300
|
+
Debug.assert(isInstanceOfExpression(left.parent));
|
|
76301
|
+
const signature = getResolvedSignature(
|
|
76302
|
+
left.parent,
|
|
76303
|
+
/*candidatesOutArray*/
|
|
76304
|
+
void 0,
|
|
76305
|
+
checkMode
|
|
76306
|
+
);
|
|
76307
|
+
if (signature === resolvingSignature) {
|
|
76308
|
+
return silentNeverType;
|
|
76215
76309
|
}
|
|
76310
|
+
const returnType = getReturnTypeOfSignature(signature);
|
|
76311
|
+
checkTypeAssignableTo(returnType, booleanType, right, Diagnostics.An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression);
|
|
76216
76312
|
return booleanType;
|
|
76217
76313
|
}
|
|
76218
76314
|
function hasEmptyObjectIntersection(type) {
|
|
@@ -76750,7 +76846,7 @@ ${lanes.join("\n")}
|
|
|
76750
76846
|
case 36 /* ExclamationEqualsToken */:
|
|
76751
76847
|
case 37 /* EqualsEqualsEqualsToken */:
|
|
76752
76848
|
case 38 /* ExclamationEqualsEqualsToken */:
|
|
76753
|
-
if (!(checkMode && checkMode &
|
|
76849
|
+
if (!(checkMode && checkMode & 64 /* TypeOnly */)) {
|
|
76754
76850
|
if ((isLiteralExpressionOfObject(left) || isLiteralExpressionOfObject(right)) && // only report for === and !== in JS, not == or !=
|
|
76755
76851
|
(!isInJSFile(left) || (operator === 37 /* EqualsEqualsEqualsToken */ || operator === 38 /* ExclamationEqualsEqualsToken */))) {
|
|
76756
76852
|
const eqType = operator === 35 /* EqualsEqualsToken */ || operator === 37 /* EqualsEqualsEqualsToken */;
|
|
@@ -76761,7 +76857,7 @@ ${lanes.join("\n")}
|
|
|
76761
76857
|
}
|
|
76762
76858
|
return booleanType;
|
|
76763
76859
|
case 104 /* InstanceOfKeyword */:
|
|
76764
|
-
return checkInstanceOfExpression(left, right, leftType, rightType);
|
|
76860
|
+
return checkInstanceOfExpression(left, right, leftType, rightType, checkMode);
|
|
76765
76861
|
case 103 /* InKeyword */:
|
|
76766
76862
|
return checkInExpression(left, right, leftType, rightType);
|
|
76767
76863
|
case 56 /* AmpersandAmpersandToken */:
|
|
@@ -77398,7 +77494,7 @@ ${lanes.join("\n")}
|
|
|
77398
77494
|
}
|
|
77399
77495
|
}
|
|
77400
77496
|
const startInvocationCount = flowInvocationCount;
|
|
77401
|
-
const type = checkExpression(node,
|
|
77497
|
+
const type = checkExpression(node, 64 /* TypeOnly */);
|
|
77402
77498
|
if (flowInvocationCount !== startInvocationCount) {
|
|
77403
77499
|
const cache = flowTypeCache || (flowTypeCache = []);
|
|
77404
77500
|
cache[getNodeId(node)] = type;
|
|
@@ -79864,7 +79960,7 @@ ${lanes.join("\n")}
|
|
|
79864
79960
|
checkComputedPropertyName(node.propertyName);
|
|
79865
79961
|
}
|
|
79866
79962
|
const parent2 = node.parent.parent;
|
|
79867
|
-
const parentCheckMode = node.dotDotDotToken ?
|
|
79963
|
+
const parentCheckMode = node.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */;
|
|
79868
79964
|
const parentType = getTypeForBindingElementParent(parent2, parentCheckMode);
|
|
79869
79965
|
const name = node.propertyName || node.name;
|
|
79870
79966
|
if (parentType && !isBindingPattern(name)) {
|
|
@@ -82081,7 +82177,7 @@ ${lanes.join("\n")}
|
|
|
82081
82177
|
}
|
|
82082
82178
|
if (isConstantVariable(symbol)) {
|
|
82083
82179
|
const declaration = symbol.valueDeclaration;
|
|
82084
|
-
if (declaration && !declaration.type && declaration.initializer && (!location || declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location))) {
|
|
82180
|
+
if (declaration && isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && (!location || declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location))) {
|
|
82085
82181
|
return evaluate(declaration.initializer, declaration);
|
|
82086
82182
|
}
|
|
82087
82183
|
}
|
|
@@ -83173,6 +83269,12 @@ ${lanes.join("\n")}
|
|
|
83173
83269
|
case 234 /* AsExpression */:
|
|
83174
83270
|
case 217 /* ParenthesizedExpression */:
|
|
83175
83271
|
checkAssertionDeferred(node);
|
|
83272
|
+
break;
|
|
83273
|
+
case 226 /* BinaryExpression */:
|
|
83274
|
+
if (isInstanceOfExpression(node)) {
|
|
83275
|
+
resolveUntypedCall(node);
|
|
83276
|
+
}
|
|
83277
|
+
break;
|
|
83176
83278
|
}
|
|
83177
83279
|
currentNode = saveCurrentNode;
|
|
83178
83280
|
(_b = tracing) == null ? void 0 : _b.pop();
|
|
@@ -83789,6 +83891,13 @@ ${lanes.join("\n")}
|
|
|
83789
83891
|
case 102 /* ImportKeyword */:
|
|
83790
83892
|
case 105 /* NewKeyword */:
|
|
83791
83893
|
return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0;
|
|
83894
|
+
case 104 /* InstanceOfKeyword */:
|
|
83895
|
+
if (isBinaryExpression(node.parent)) {
|
|
83896
|
+
const type = getTypeOfExpression(node.parent.right);
|
|
83897
|
+
const hasInstanceMethodType = getSymbolHasInstanceMethodOfObjectType(type);
|
|
83898
|
+
return (hasInstanceMethodType == null ? void 0 : hasInstanceMethodType.symbol) ?? type.symbol;
|
|
83899
|
+
}
|
|
83900
|
+
return void 0;
|
|
83792
83901
|
case 236 /* MetaProperty */:
|
|
83793
83902
|
return checkExpression(node).symbol;
|
|
83794
83903
|
case 295 /* JsxNamespacedName */:
|
|
@@ -86686,9 +86795,8 @@ ${lanes.join("\n")}
|
|
|
86686
86795
|
CheckMode3[CheckMode3["SkipContextSensitive"] = 4] = "SkipContextSensitive";
|
|
86687
86796
|
CheckMode3[CheckMode3["SkipGenericFunctions"] = 8] = "SkipGenericFunctions";
|
|
86688
86797
|
CheckMode3[CheckMode3["IsForSignatureHelp"] = 16] = "IsForSignatureHelp";
|
|
86689
|
-
CheckMode3[CheckMode3["
|
|
86690
|
-
CheckMode3[CheckMode3["
|
|
86691
|
-
CheckMode3[CheckMode3["TypeOnly"] = 128] = "TypeOnly";
|
|
86798
|
+
CheckMode3[CheckMode3["RestBindingElement"] = 32] = "RestBindingElement";
|
|
86799
|
+
CheckMode3[CheckMode3["TypeOnly"] = 64] = "TypeOnly";
|
|
86692
86800
|
return CheckMode3;
|
|
86693
86801
|
})(CheckMode || {});
|
|
86694
86802
|
SignatureCheckMode = /* @__PURE__ */ ((SignatureCheckMode3) => {
|
|
@@ -163624,14 +163732,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163624
163732
|
if (isModuleReferenceType(declarationType)) {
|
|
163625
163733
|
return;
|
|
163626
163734
|
}
|
|
163627
|
-
const
|
|
163628
|
-
if (
|
|
163629
|
-
const hintText = typeof
|
|
163735
|
+
const hintParts = typeToInlayHintParts(declarationType);
|
|
163736
|
+
if (hintParts) {
|
|
163737
|
+
const hintText = typeof hintParts === "string" ? hintParts : hintParts.map((part) => part.text).join("");
|
|
163630
163738
|
const isVariableNameMatchesType = preferences.includeInlayVariableTypeHintsWhenTypeMatchesName === false && equateStringsCaseInsensitive(decl.name.getText(), hintText);
|
|
163631
163739
|
if (isVariableNameMatchesType) {
|
|
163632
163740
|
return;
|
|
163633
163741
|
}
|
|
163634
|
-
addTypeHints(
|
|
163742
|
+
addTypeHints(hintParts, decl.name.end);
|
|
163635
163743
|
}
|
|
163636
163744
|
}
|
|
163637
163745
|
function visitCallOrNewExpression(expr) {
|
|
@@ -163739,9 +163847,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163739
163847
|
if (isModuleReferenceType(returnType)) {
|
|
163740
163848
|
return;
|
|
163741
163849
|
}
|
|
163742
|
-
const
|
|
163743
|
-
if (
|
|
163744
|
-
addTypeHints(
|
|
163850
|
+
const hintParts = typeToInlayHintParts(returnType);
|
|
163851
|
+
if (hintParts) {
|
|
163852
|
+
addTypeHints(hintParts, getTypeAnnotationPosition(decl));
|
|
163745
163853
|
}
|
|
163746
163854
|
}
|
|
163747
163855
|
function getTypeAnnotationPosition(decl) {
|
|
@@ -163765,14 +163873,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163765
163873
|
if (effectiveTypeAnnotation) {
|
|
163766
163874
|
continue;
|
|
163767
163875
|
}
|
|
163768
|
-
const
|
|
163769
|
-
if (!
|
|
163876
|
+
const typeHints = getParameterDeclarationTypeHints(signature.parameters[i]);
|
|
163877
|
+
if (!typeHints) {
|
|
163770
163878
|
continue;
|
|
163771
163879
|
}
|
|
163772
|
-
addTypeHints(
|
|
163880
|
+
addTypeHints(typeHints, param.questionToken ? param.questionToken.end : param.name.end);
|
|
163773
163881
|
}
|
|
163774
163882
|
}
|
|
163775
|
-
function
|
|
163883
|
+
function getParameterDeclarationTypeHints(symbol) {
|
|
163776
163884
|
const valueDeclaration = symbol.valueDeclaration;
|
|
163777
163885
|
if (!valueDeclaration || !isParameter(valueDeclaration)) {
|
|
163778
163886
|
return void 0;
|
|
@@ -163781,7 +163889,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163781
163889
|
if (isModuleReferenceType(signatureParamType)) {
|
|
163782
163890
|
return void 0;
|
|
163783
163891
|
}
|
|
163784
|
-
return
|
|
163892
|
+
return typeToInlayHintParts(signatureParamType);
|
|
163785
163893
|
}
|
|
163786
163894
|
function printTypeInSingleLine(type) {
|
|
163787
163895
|
const flags = 70221824 /* IgnoreErrors */ | 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */;
|
|
@@ -184313,7 +184421,7 @@ ${e.message}`;
|
|
|
184313
184421
|
isClassDeclaration: () => isClassDeclaration,
|
|
184314
184422
|
isClassElement: () => isClassElement,
|
|
184315
184423
|
isClassExpression: () => isClassExpression,
|
|
184316
|
-
|
|
184424
|
+
isClassInstanceProperty: () => isClassInstanceProperty,
|
|
184317
184425
|
isClassLike: () => isClassLike,
|
|
184318
184426
|
isClassMemberModifier: () => isClassMemberModifier,
|
|
184319
184427
|
isClassNamedEvaluationHelperBlock: () => isClassNamedEvaluationHelperBlock,
|
|
@@ -184504,6 +184612,7 @@ ${e.message}`;
|
|
|
184504
184612
|
isInsideJsxElementOrAttribute: () => isInsideJsxElementOrAttribute,
|
|
184505
184613
|
isInsideNodeModules: () => isInsideNodeModules,
|
|
184506
184614
|
isInsideTemplateLiteral: () => isInsideTemplateLiteral,
|
|
184615
|
+
isInstanceOfExpression: () => isInstanceOfExpression,
|
|
184507
184616
|
isInstantiatedModule: () => isInstantiatedModule,
|
|
184508
184617
|
isInterfaceDeclaration: () => isInterfaceDeclaration,
|
|
184509
184618
|
isInternalDeclaration: () => isInternalDeclaration,
|
|
@@ -184761,6 +184870,7 @@ ${e.message}`;
|
|
|
184761
184870
|
isReturnStatement: () => isReturnStatement,
|
|
184762
184871
|
isReturnStatementWithFixablePromiseHandler: () => isReturnStatementWithFixablePromiseHandler,
|
|
184763
184872
|
isRightSideOfAccessExpression: () => isRightSideOfAccessExpression,
|
|
184873
|
+
isRightSideOfInstanceofExpression: () => isRightSideOfInstanceofExpression,
|
|
184764
184874
|
isRightSideOfPropertyAccess: () => isRightSideOfPropertyAccess,
|
|
184765
184875
|
isRightSideOfQualifiedName: () => isRightSideOfQualifiedName,
|
|
184766
184876
|
isRightSideOfQualifiedNameOrPropertyAccess: () => isRightSideOfQualifiedNameOrPropertyAccess,
|
|
@@ -186718,7 +186828,7 @@ ${e.message}`;
|
|
|
186718
186828
|
isClassDeclaration: () => isClassDeclaration,
|
|
186719
186829
|
isClassElement: () => isClassElement,
|
|
186720
186830
|
isClassExpression: () => isClassExpression,
|
|
186721
|
-
|
|
186831
|
+
isClassInstanceProperty: () => isClassInstanceProperty,
|
|
186722
186832
|
isClassLike: () => isClassLike,
|
|
186723
186833
|
isClassMemberModifier: () => isClassMemberModifier,
|
|
186724
186834
|
isClassNamedEvaluationHelperBlock: () => isClassNamedEvaluationHelperBlock,
|
|
@@ -186909,6 +187019,7 @@ ${e.message}`;
|
|
|
186909
187019
|
isInsideJsxElementOrAttribute: () => isInsideJsxElementOrAttribute,
|
|
186910
187020
|
isInsideNodeModules: () => isInsideNodeModules,
|
|
186911
187021
|
isInsideTemplateLiteral: () => isInsideTemplateLiteral,
|
|
187022
|
+
isInstanceOfExpression: () => isInstanceOfExpression,
|
|
186912
187023
|
isInstantiatedModule: () => isInstantiatedModule,
|
|
186913
187024
|
isInterfaceDeclaration: () => isInterfaceDeclaration,
|
|
186914
187025
|
isInternalDeclaration: () => isInternalDeclaration,
|
|
@@ -187166,6 +187277,7 @@ ${e.message}`;
|
|
|
187166
187277
|
isReturnStatement: () => isReturnStatement,
|
|
187167
187278
|
isReturnStatementWithFixablePromiseHandler: () => isReturnStatementWithFixablePromiseHandler,
|
|
187168
187279
|
isRightSideOfAccessExpression: () => isRightSideOfAccessExpression,
|
|
187280
|
+
isRightSideOfInstanceofExpression: () => isRightSideOfInstanceofExpression,
|
|
187169
187281
|
isRightSideOfPropertyAccess: () => isRightSideOfPropertyAccess,
|
|
187170
187282
|
isRightSideOfQualifiedName: () => isRightSideOfQualifiedName,
|
|
187171
187283
|
isRightSideOfQualifiedNameOrPropertyAccess: () => isRightSideOfQualifiedNameOrPropertyAccess,
|
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.3";
|
|
57
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20230930`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -5579,7 +5579,7 @@ var Diagnostics = {
|
|
|
5579
5579
|
An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2356, 1 /* Error */, "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356", "An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."),
|
|
5580
5580
|
The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access: diag(2357, 1 /* Error */, "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357", "The operand of an increment or decrement operator must be a variable or a property access."),
|
|
5581
5581
|
The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: diag(2358, 1 /* Error */, "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358", "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."),
|
|
5582
|
-
|
|
5582
|
+
The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method: diag(2359, 1 /* Error */, "The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_2359", "The right-hand side of an 'instanceof' expression must be either of type 'any', a class, function, or other type assignable to the 'Function' interface type, or an object type with a 'Symbol.hasInstance' method."),
|
|
5583
5583
|
The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2362, 1 /* Error */, "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362", "The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),
|
|
5584
5584
|
The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2363, 1 /* Error */, "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363", "The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),
|
|
5585
5585
|
The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access: diag(2364, 1 /* Error */, "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364", "The left-hand side of an assignment expression must be a variable or a property access."),
|
|
@@ -6028,6 +6028,8 @@ var Diagnostics = {
|
|
|
6028
6028
|
Import_attributes_cannot_be_used_with_type_only_imports_or_exports: diag(2857, 1 /* Error */, "Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857", "Import attributes cannot be used with type-only imports or exports."),
|
|
6029
6029
|
Import_attribute_values_must_be_string_literal_expressions: diag(2858, 1 /* Error */, "Import_attribute_values_must_be_string_literal_expressions_2858", "Import attribute values must be string literal expressions."),
|
|
6030
6030
|
Excessive_complexity_comparing_types_0_and_1: diag(2859, 1 /* Error */, "Excessive_complexity_comparing_types_0_and_1_2859", "Excessive complexity comparing types '{0}' and '{1}'."),
|
|
6031
|
+
The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method: diag(2860, 1 /* Error */, "The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860", "The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."),
|
|
6032
|
+
An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression: diag(2861, 1 /* Error */, "An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861", "An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."),
|
|
6031
6033
|
Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* Error */, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
6032
6034
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, 1 /* Error */, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
6033
6035
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, 1 /* Error */, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -29182,9 +29184,8 @@ var CheckMode = /* @__PURE__ */ ((CheckMode3) => {
|
|
|
29182
29184
|
CheckMode3[CheckMode3["SkipContextSensitive"] = 4] = "SkipContextSensitive";
|
|
29183
29185
|
CheckMode3[CheckMode3["SkipGenericFunctions"] = 8] = "SkipGenericFunctions";
|
|
29184
29186
|
CheckMode3[CheckMode3["IsForSignatureHelp"] = 16] = "IsForSignatureHelp";
|
|
29185
|
-
CheckMode3[CheckMode3["
|
|
29186
|
-
CheckMode3[CheckMode3["
|
|
29187
|
-
CheckMode3[CheckMode3["TypeOnly"] = 128] = "TypeOnly";
|
|
29187
|
+
CheckMode3[CheckMode3["RestBindingElement"] = 32] = "RestBindingElement";
|
|
29188
|
+
CheckMode3[CheckMode3["TypeOnly"] = 64] = "TypeOnly";
|
|
29188
29189
|
return CheckMode3;
|
|
29189
29190
|
})(CheckMode || {});
|
|
29190
29191
|
var SignatureCheckMode = /* @__PURE__ */ ((SignatureCheckMode3) => {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "typescript",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.3.0-dev.
|
|
5
|
+
"version": "5.3.0-dev.20230930",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"node": "20.1.0",
|
|
114
114
|
"npm": "8.19.4"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "695226ea5ac64195e4ab0180cd38f06010157ec0"
|
|
117
117
|
}
|