Skip to content

Commit e38103a

Browse files
committed
update iff predicates to be either sync or async
1 parent 6e91fd4 commit e38103a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

types/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ export function validateSchema(schema: object, ajv: AjvOrNewable, options?: Vali
547547
* Execute one array of hooks or another based on a sync or async predicate.
548548
* {@link https://feathers-plus.github.io/v1/feathers-hooks-common/index.html#IffElse}
549549
*/
550-
export function iffElse(predicate: SyncPredicateFn, hooksTrue: Hook | Hook[], hooksFalse: Hook | Hook[]): Hook;
550+
export function iffElse(predicate: PredicateFn, hooksTrue: Hook | Hook[], hooksFalse: Hook | Hook[]): Hook;
551551

552552
export interface IffHook extends Hook {
553553
else(...hooks: Hook[]): Hook;
@@ -557,7 +557,7 @@ export interface IffHook extends Hook {
557557
* Execute one or another series of hooks depending on a sync or async predicate.
558558
* {@link https://feathers-plus.github.io/v1/feathers-hooks-common/index.html#Iff}
559559
*/
560-
export function iff(predicate: SyncPredicateFn, ...hooks: Hook[]): IffHook;
560+
export function iff(predicate: PredicateFn, ...hooks: Hook[]): IffHook;
561561

562562
/**
563563
* Alias for iff

0 commit comments

Comments
 (0)