Add some JSDoc annotations to make type-checking warnings go away
This commit is contained in:
parent
c3166ef17b
commit
1d98a0707c
5
opter.js
5
opter.js
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Reference in New Issue