Skip to content

JSDoc attached to EOF is not checked #26905

@tschaub

Description

@tschaub

TypeScript Version: 3.1.0-dev.20180905

Search Terms:

  • JSDoc
  • EOF

Code

/**
 * @typedef {Array<number>} Good
 */

export let aboveIsChecked;

export let belowIsNot;

/**
 * @typedef {Array<bad>} Oops
 */

Expected behavior:

main.js:10:20 - error TS2304: Cannot find name 'bad'.

10  * @typedef {Array<bad>} Oops
                      ~~~

Actual behavior:

tsc --pretty exits with 0 status.

Although the end of file token is visited, the JSDoc nodes on this token are not checked.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationFixedA PR has been merged for this issueGood First IssueWell scoped, documented and has the green light

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions