From f75579a7b95bc899aa6b42da9063993401420326 Mon Sep 17 00:00:00 2001 From: Luke Edwards Date: Thu, 6 Jan 2022 09:06:27 -0800 Subject: [PATCH] fix(types): remove generic from `Handler` type - Closes #52 --- index.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.d.ts b/index.d.ts index b0384ea..4a269ec 100644 --- a/index.d.ts +++ b/index.d.ts @@ -5,12 +5,12 @@ type Arrayable = T | T[]; declare function sade(usage: string, isSingle?: boolean): sade.Sade; declare namespace sade { + export type Handler = (...args: any[]) => any; export type Value = number | string | boolean | null; - export type Handler = (...args: [...T, mri.Argv]) => any; - export interface LazyOutput { + export interface LazyOutput { name: string; - handler: Handler; + handler: Handler; args: string[]; } @@ -21,12 +21,12 @@ declare namespace sade { }): Sade; option(flag: string, description?: string, value?: Value): Sade; - action(handler: Handler): Sade; + action(handler: Handler): Sade; describe(text: Arrayable): Sade; alias(...names: string[]): Sade; example(usage: string): Sade; - parse(arr: string[], opts: { lazy: true } & mri.Options): LazyOutput; + parse(arr: string[], opts: { lazy: true } & mri.Options): LazyOutput; parse(arr: string[], opts?: { lazy?: boolean } & mri.Options): void; version(value: string): Sade;