From b8fe5eca622140baaa4dfb45c1b7d5e6774780ce Mon Sep 17 00:00:00 2001 From: Christian Murphy Date: Tue, 6 Jul 2021 10:14:17 -0700 Subject: [PATCH] Fix types to support booleans Related to GH-145. Closes GH-147. Reviewed-by: Titus Wormer --- types/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/index.d.ts b/types/index.d.ts index e3e77de3..42e945a2 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -17,9 +17,9 @@ export interface Processor

extends FrozenProcessor

{ * @typeParam S Plugin settings * @returns The processor on which use is called */ - use( + use( plugin: Plugin, - ...settings: S + ...settings: S | [boolean] ): Processor

/** @@ -222,7 +222,7 @@ export interface FrozenProcessor

{ * @returns Optional Transformer. */ export type Plugin< - S extends any[] = [(Settings | boolean)?], + S extends any[] = [Settings?], P = Settings > = Attacher @@ -260,7 +260,7 @@ export interface ProcessorSettings

{ * @typeParam P Processor settings */ export type PluginTuple< - S extends any[] = [(Settings | boolean)?], + S extends any[] = [Settings?], P = Settings > = [Plugin, ...S]