1499
}
1500
[kDeleteFromParserHintObject](optionKey: string) {
1502
>
// boolean, array, key, alias, etc.
1503
>
objectKeys(this.#options).forEach((hintKey: keyof Options) => {
1504
>
// configObjects is not a parsing hint array
1505
>
if (((key): key is 'configObjects' => key === 'configObjects')(hintKey))
1506
>
return;
1507
>
const hint = this.#options[hintKey];
1508
>
if (Array.isArray(hint)) {
1509
>
if (hint.includes(optionKey)) hint.splice(hint.indexOf(optionKey), 1);
1510
>
} else if (typeof hint === 'object') {
1511
>
delete (hint as Dictionary)[optionKey];
1512
>
}
1513
>
});
1514
>
// now delete the description from usage.js.
1515
>
delete this.#usage.getDescriptions()[optionKey];
1516
>
}
1517
[kEmitWarning](
1518
warning: string,