englercj / tsd-jsdoc

Compiles JSDoc annotated JavaScript into a Typescript Definition file (.d.ts)
MIT License
316 stars 42 forks source link

resolves #113 Added source location information to warnings #114

Closed yin closed 4 years ago

yin commented 4 years ago

The error messages are missing source locations for ease of navigating. This PR add to every logged error: Source filename (not the path), line number, and column number:

[TSD-JSDoc] dataset.js:619:4 Failed to find parent of doclet 'DatasetLocal#_getItemIndexes' using memberof 'DatasetLocal', this is likely due to invalid JSDoc.
[TSD-JSDoc] dataset.js:630:4 Failed to find parent of doclet 'DatasetLocal#_readAndParseFile' using memberof 'DatasetLocal', this is likely due to invalid JSDoc.
[TSD-JSDoc] stealth.js:40:0 Failed to find parent of doclet 'module.exports' using memberof 'module', this is likely due to invalid JSDoc.
[TSD-JSDoc] autoscaled_pool.js:209:4 Unable to resolve type for AutoscaledPool#minConcurrency, none specified in JSDoc. Defaulting to `any`.

Please review and comment.

yin commented 4 years ago

I fully agree.