mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Actually, it makes more sense to error on the predicate annotation than anything else.
This commit is contained in:
1 parent
050f52f07d
commit
b191a00b1c
1 file changed
+1
-1
@@ -11567,7 +11567,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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user