Merge pull request #32275 from dieseldjango/master

@types/hapi: ServerMethod does not have to return a Promise
This commit is contained in:
Daniel Rosenwasser
2019-01-18 16:46:59 -08:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -2704,7 +2704,7 @@ export interface ServerInjectResponse extends Shot.ResponseObject {
* * * ttl - 0 if result is valid but cannot be cached. Defaults to cache policy.
* For reference [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-servermethodname-method-options)
*/
export type ServerMethod = (...args: any[]) => Promise<any>;
export type ServerMethod = (...args: any[]) => any;
/**
* The same cache configuration used in server.cache().
+1 -1
View File
@@ -6,7 +6,7 @@ const server = new Server({
});
server.start();
const add = (a: any, b: any) => {
const add = (a: any, b: any): number => {
return a + b;
};