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:
Paul van Brenk
2018-06-25 13:30:20 -07:00
committed by GitHub
+4 -1
View File
@@ -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;