diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 1e332254502..9db3dff8329 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -11496,7 +11496,7 @@ namespace ts { const parent = getTypePredicateParent(node); if (!parent) { // The parent must not be valid. - error(node.parent, Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); + error(node, Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); return; }