Skip to content

Commit b8fe5ec

Browse files
Fix types to support booleans
Related to GH-145. Closes GH-147. Reviewed-by: Titus Wormer <tituswormer@gmail.com>
1 parent 5167c49 commit b8fe5ec

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

types/index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ export interface Processor<P = Settings> extends FrozenProcessor<P> {
1717
* @typeParam S Plugin settings
1818
* @returns The processor on which use is called
1919
*/
20-
use<S extends any[] = [(Settings | boolean)?]>(
20+
use<S extends any[] = [Settings?]>(
2121
plugin: Plugin<S, P>,
22-
...settings: S
22+
...settings: S | [boolean]
2323
): Processor<P>
2424

2525
/**
@@ -222,7 +222,7 @@ export interface FrozenProcessor<P = Settings> {
222222
* @returns Optional Transformer.
223223
*/
224224
export type Plugin<
225-
S extends any[] = [(Settings | boolean)?],
225+
S extends any[] = [Settings?],
226226
P = Settings
227227
> = Attacher<S, P>
228228

@@ -260,7 +260,7 @@ export interface ProcessorSettings<P = Settings> {
260260
* @typeParam P Processor settings
261261
*/
262262
export type PluginTuple<
263-
S extends any[] = [(Settings | boolean)?],
263+
S extends any[] = [Settings?],
264264
P = Settings
265265
> = [Plugin<S, P>, ...S]
266266

0 commit comments

Comments
 (0)