mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
Merge pull request #26805 from j2L4e/patch-5
[@feathersjs/feathers] add feathers.SKIP and ability to return it from hooks
This commit is contained in:
+4
-1
@@ -14,6 +14,7 @@ declare const feathers: (() => Application<object>) & typeof self;
|
||||
export default feathers;
|
||||
|
||||
export const version: string;
|
||||
export const SKIP: SkipSymbol;
|
||||
|
||||
export type Id = number | string;
|
||||
export type NullableId = Id | null;
|
||||
@@ -45,7 +46,9 @@ export interface Paginated<T> {
|
||||
}
|
||||
|
||||
// tslint:disable-next-line void-return
|
||||
export type Hook = (hook: HookContext) => (Promise<HookContext> | void);
|
||||
export type Hook = (hook: HookContext) => (Promise<HookContext | SkipSymbol | void> | HookContext | SkipSymbol | void);
|
||||
|
||||
export type SkipSymbol = symbol | '__feathersSkipHooks';
|
||||
|
||||
export interface HookContext<T = any> {
|
||||
app?: Application;
|
||||
|
||||
Reference in New Issue
Block a user