You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type_predicate_0_is_not_assignable_to_1: {code: 1226,category: DiagnosticCategory.Error,key: "Type predicate '{0}' is not assignable to '{1}'."},
185
185
Parameter_0_is_not_in_the_same_position_as_parameter_1: {code: 1227,category: DiagnosticCategory.Error,key: "Parameter '{0}' is not in the same position as parameter '{1}'."},
186
-
Cannot_define_type_predicate_0_as_a_type_to_a_type_predicate: {code: 1228,category: DiagnosticCategory.Error,key: "Cannot define type predicate '{0}' as a type to a type predicate."},
186
+
Type_predicates_are_only_allowed_in_return_type_position: {code: 1228,category: DiagnosticCategory.Error,key: "Type predicates are only allowed in return type position."},
Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: {code: 2301,category: DiagnosticCategory.Error,key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."},
189
189
Static_members_cannot_reference_class_type_parameters: {code: 2302,category: DiagnosticCategory.Error,key: "Static members cannot reference class type parameters."},
Copy file name to clipboardExpand all lines: tests/baselines/reference/typeGuardFunctionErrors.errors.txt
+19-4
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(15,12): error TS2322: Type 'string' is not assignable to type 'boolean'.
2
-
tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(18,55): error TS1228: Cannot define type predicate 'x is A' as a type to a type predicate.
2
+
tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(18,55): error TS1228: Type predicates are only allowed in return type position.
3
3
tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(22,33): error TS2304: Cannot find name 'x'.
4
4
tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(26,10): error TS2391: Function implementation is missing or not immediately following the declaration.
5
5
tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(27,5): error TS1131: Property or signature expected.
Parameter 'p2' is not in the same position as parameter 'p1'.
23
23
tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(87,1): error TS2322: Type '(p1: any, p2: any, p3: any) => boolean' is not assignable to type '(p1: any, p2: any) => boolean'.
tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(95,9): error TS1228: Type predicates are only allowed in return type position.
26
+
tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(96,16): error TS1228: Type predicates are only allowed in return type position.
27
+
tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(97,20): error TS1228: Type predicates are only allowed in return type position.
0 commit comments