File tree 2 files changed +2
-1
lines changed 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -6776,7 +6776,7 @@ module ts {
6776
6776
// and the right operand to be of type Any or a subtype of the 'Function' interface type.
6777
6777
// The result is always of the Boolean primitive type.
6778
6778
// NOTE: do not raise error if leftType is unknown as related error was already reported
6779
- if (! isTypeOfKind(leftType, TypeFlags.Any | TypeFlags.ObjectType | TypeFlags.TypeParameter )) {
6779
+ if (isTypeOfKind(leftType, TypeFlags.Primitive )) {
6780
6780
error(node.left, Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter);
6781
6781
}
6782
6782
// NOTE: do not raise error if right is unknown as related error was already reported
Original file line number Diff line number Diff line change @@ -1286,6 +1286,7 @@ module ts {
1286
1286
Unwidened = 0x00020000 , // Unwidened type (is or contains Undefined or Null type)
1287
1287
1288
1288
Intrinsic = Any | String | Number | Boolean | Void | Undefined | Null ,
1289
+ Primitive = String | Number | Boolean | Void | Undefined | Null | StringLiteral | Enum ,
1289
1290
StringLike = String | StringLiteral ,
1290
1291
NumberLike = Number | Enum ,
1291
1292
ObjectType = Class | Interface | Reference | Tuple | Anonymous ,
You can’t perform that action at this time.
0 commit comments