diff --git a/typings/index.d.ts b/typings/index.d.ts index e1b80e3d2..2ad68feb0 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -535,10 +535,10 @@ export class Command { * * @returns `this` command for chaining */ - option(flags: string, description?: string, defaultValue?: string | boolean | string[]): this; + option(flags: string, description?: string, defaultValue?: unknown): this; option(flags: string, description: string, fn: (value: string, previous: T) => T, defaultValue?: T): this; /** @deprecated since v7, instead use choices or a custom function */ - option(flags: string, description: string, regexp: RegExp, defaultValue?: string | boolean | string[]): this; + option(flags: string, description: string, regexp: RegExp, defaultValue?: unknown): this; /** * Define a required option, which must have a value after parsing. This usually means @@ -546,10 +546,10 @@ export class Command { * * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space. */ - requiredOption(flags: string, description?: string, defaultValue?: string | boolean | string[]): this; + requiredOption(flags: string, description?: string, defaultValue?: unknown): this; requiredOption(flags: string, description: string, fn: (value: string, previous: T) => T, defaultValue?: T): this; /** @deprecated since v7, instead use choices or a custom function */ - requiredOption(flags: string, description: string, regexp: RegExp, defaultValue?: string | boolean | string[]): this; + requiredOption(flags: string, description: string, regexp: RegExp, defaultValue?: unknown): this; /** * Factory routine to create a new unattached option.