Commit graph

3 commits

Author SHA1 Message Date
Nathan Shively-Sanders b56093f3ac
Fix type when annotated with a JSDoc function type (#22692)
* Fix type when annotated with a JSDoc function type

Previously,
1. A variable annotated with a JSDoc function type would not require all
its parameters to be provided. This should only apply to functions
without a type annotation.
2. A parameter in a function with a JSDoc function type annotation would
still have the type 'any'.
3. Two `var` declarations in a Typescript and Javascript file,
respectively, would error even when they had identical function types.

* Update baselines and add constructor test

* Handle ConstructorType too

* Add test:method sig inside literal type

* Contextually type parameters by parent sig's JSDoc

Instead of a syntactic check in getJSDocTag

* Remove redundant check:isUntypedSignatureInJSFile

* Positive check for value signatures

Instead of excluding type signatures piecemeal.
2018-03-19 16:00:45 -07:00
Kanchalai Tanglertsampan 7ae4ff3b3d Add tests and update baselines 2017-07-10 15:24:03 -07:00
Yui T 0cbfc79ca7 Rename test files to be more consistent and move them into jsdoc folder 2017-05-26 11:20:57 -07:00
Renamed from tests/cases/conformance/salsa/jsDocTypes.ts (Browse further)