Commit graph

2 commits

Author SHA1 Message Date
Nathan Shively-Sanders a6c5d50749
Allow type predicates in JSDoc (#26343)
* Allow type predicates

1. Parse type predicates. Note that they are parsed everywhere, and get
the appropriate error when used places besides a return type.
2. When creating a type predicate, correctly find the function's parameters
starting from the jsdoc return type.

* Fix type of TypePredicateNode.parent: add JSDocTypeExpression

* Update API baselines

* Handle JSDoc signature inside @type annotations

* Fix circularity when getting type predicates

Also move createTypePredicateFromTypePredicateNode closer to its use

* More cleanup based on review comments
2018-08-10 15:31:39 -07:00
Nathan Shively-Sanders a7af92eb63
check return tag in getTypePredicateOfSignature (#25130) 2018-06-21 11:30:37 -07:00