Skip to content

Commit

Permalink
update iff predicates to be either sync or async
Browse files Browse the repository at this point in the history
  • Loading branch information
NickBolles committed Feb 13, 2019
1 parent 6e91fd4 commit e38103a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ export function validateSchema(schema: object, ajv: AjvOrNewable, options?: Vali
* Execute one array of hooks or another based on a sync or async predicate.
* {@link https://feathers-plus.github.io/v1/feathers-hooks-common/index.html#IffElse}
*/
export function iffElse(predicate: SyncPredicateFn, hooksTrue: Hook | Hook[], hooksFalse: Hook | Hook[]): Hook;
export function iffElse(predicate: PredicateFn, hooksTrue: Hook | Hook[], hooksFalse: Hook | Hook[]): Hook;

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

/**
* Alias for iff
Expand Down

0 comments on commit e38103a

Please sign in to comment.