In JS, return type of type reference in @type
tag is ignored on function declarations.
#25525
Labels
Bug
A bug in TypeScript
checkJs
Relates to checking JavaScript using TypeScript
Domain: JSDoc
Relates to JSDoc parsing and type generation
Fixed
A PR has been merged for this issue
Milestone
TypeScript Version: 3.0.0-dev.20180707
Code
Expected behavior:
x0
throughx3
are all of type"a" | "b"
.Actual behavior:
x2
is of typestring
.Noticed while reviewing #25486.
The text was updated successfully, but these errors were encountered: