Skip to content

Commit 6535809

Browse files
Actually, it makes more sense to error on the predicate annotation than anything else.
1 parent 5777e7d commit 6535809

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11496,7 +11496,7 @@ namespace ts {
1149611496
const parent = getTypePredicateParent(node);
1149711497
if (!parent) {
1149811498
// The parent must not be valid.
11499-
error(node.parent, Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);
11499+
error(node, Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);
1150011500
return;
1150111501
}
1150211502

0 commit comments

Comments
 (0)