Skip to content
Myr

Add attributeName to Option typings (#1483)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by John Gee · committed by GitHub · parent 26223d0 · Browse files · 2 files+9 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+9 added−0 removed

  • other:+9 added−0 removed

2 files+9 added−0 removed

modified:typings/index.d.ts+6 added
76 unmodified lines
77 /**78 * Return option name.79 */80 name(): string;8182 /**83 * Return option name, in a camelcase format that can be used84 * as a object attribute key.85 */86 attributeName(): string;87 }88 type OptionConstructor = new (flags: string, description?: string) => Option;8990 interface Help {
537 unmodified lines
modified:typings/index.test-d.ts+3 added
322 unmodified lines
323expectType<commander.Option>(baseOption.choices(['a', 'b']));324325// name326expectType<string>(baseOption.name());327328// attributeName329expectType<string>(baseOption.attributeName());