Skip to content

Commit

Permalink
add loopback Remote hooks definitely types
Browse files Browse the repository at this point in the history
  • Loading branch information
richardgong1987 committed Apr 24, 2017
1 parent 0691dc0 commit 6292510
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ node_modules
.vs
.vscode
yarn.lock
.idea
20 changes: 20 additions & 0 deletions types/loopback/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
************************************************/

import * as core from "express-serve-static-core";
import {NextFunction} from "../express-serve-static-core/index";

declare function l(): l.LoopBackApplication;
declare namespace l {
Expand Down Expand Up @@ -886,8 +887,27 @@ declare namespace l {
* See [Setting up a custom model](docs.strongloop.com/display/LB/Extending+built-in+models#Extendingbuilt-inmodels-Settingupacustommodel)
*/
static setup(): void;

static setup(): void;

/**
* loopback 3.x Remote hooks
* http://loopback.io/doc/en/lb3/Remote-hooks.html
* @param method
* @param fn
*/
beforeRemote(method: string, backback: (ctx: Context, modelInstanceOrNext: Model
| NextFunction, next?: NextFunction)=>void): void;

afterRemote(method: string, backback: (ctx: Context, modelInstanceOrNext: Model
| NextFunction, next?: NextFunction) => void): void;

afterRemoteError(method: string, next: NextFunction): void;

}



/**
* SharedClass
* Create a new SharedClass with the given options.
Expand Down

0 comments on commit 6292510

Please sign in to comment.