Closed jackbsteinberg closed 5 years ago
I've noticed this issue before but I want to find a test that fails before the change and passes after to really confirm it, before actually making the change.
On Thu, 12 Sep 2019 at 13:57, Domenic Denicola notifications@github.com wrote:
I've noticed this issue before but I want to find a test that fails before the change and passes after to really confirm it, before actually making the change.
Doesn't this fix types that are only known from jsdoc comments?
F
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jackbsteinberg/get-originals-rewriter/issues/77?email_source=notifications&email_token=ABAO5ZYTK4YMH5EVS6UOCX3QJHD43A5CNFSM4IV67VHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6QU4OY#issuecomment-530665019, or mute the thread https://github.com/notifications/unsubscribe-auth/ABAO5Z7ZJMFKOHOCYNFBLVTQJHD43ANCNFSM4IV67VHA .
Per the discussion in #80 it doesn't seem to be necessary.
Currently the ts-ast-viewer seems to ignore JSDoc comments on function declarations, e.g.:
Where type for
elt
shows up as "any." This, however, changes when I change the script kind tots.scriptKind.JS
, at which point the type shows up as expected due to the JSDoc.Currently there are no tests that cover function behavior (reflected in issue #31), but if the default script kind is the same in the rewriter as it is in the ast-viewer (
ts.scriptKind.TSX
), then JSDoc function tests will fail. So it would probably be a good idea to change this.