Skip to content

Commit b191a00

Browse files
Actually, it makes more sense to error on the predicate annotation than anything else.
1 parent 050f52f commit b191a00

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11567,7 +11567,7 @@ namespace ts {
1156711567
const parent = getTypePredicateParent(node);
1156811568
if (!parent) {
1156911569
// The parent must not be valid.
11570-
error(node.parent, Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);
11570+
error(node, Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);
1157111571
return;
1157211572
}
1157311573

0 commit comments

Comments
 (0)