-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strict JSDoc type linting #6
base: dev
Are you sure you want to change the base?
Conversation
as needed by `--noImplicitThis` flag in checkjs command script
…SDoc type checing
/cc @rbiggs |
@@ -4,6 +4,8 @@ var expect = require('chai').expect, | |||
|
|||
|
|||
describe('program-helper', function () { | |||
// FUTURE TODO DEFINE EXPLICITLY in lib/program-helper.js: | |||
/** @type {Record<string, Function>} */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this workaround hack should be removed, if possible.
@@ -20,11 +20,13 @@ function error() { | |||
|
|||
/** | |||
* Resolve file globs based in command line or tsconfig.json file. | |||
* @returns {Array} | |||
* May throw an error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should use JSDoc @throws
comment here, and check for other places where this may be needed
Updates to support strict JSDoc type linting
Note that there is a quick workaround hack in
test/program-helper.spec.js
. TODO item is to updatelib/program-helper.js
to export the helper object with proper typing. (Alternative would be to add a .d.ts file, which seems to be common practice but I think it is not 100% ideal.)TODO items:
lib/program-helper.js
to export helper object with proper JSDoc typings