Add some JSDoc annotations to make type-checking warnings go away

This commit is contained in:
n loewen 2023-09-23 19:16:25 -07:00
parent c3166ef17b
commit 1d98a0707c
1 changed files with 4 additions and 1 deletions

View File

@ -40,7 +40,9 @@ module.exports = class Opter {
parse(argv) {
this.userOptions = argvToObject(argv);
// collect user opts with the long names as keys, for output
/**
* @type {Object<string, boolean | Array<string>>}
* The user-provided with ther long names as the keys **/
let normalizedUserOptions = {};
Object.keys(this.definedOptions).forEach(longName => {
@ -128,6 +130,7 @@ function argvToObject(argv) {
return;
});
/** @type {Object<string, boolean | Array<string>>} **/
let out = {};
grouped.forEach((a, i) => {
let next = grouped[i+1];