mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-17 22:44:18 +08:00
Sync plugin definitions to Hapi 17.
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
import Bcrypt = require('bcrypt');
|
||||
import Basic = require('hapi-auth-basic');
|
||||
import * as Hapi from 'hapi';
|
||||
import { Server } from 'hapi';
|
||||
|
||||
const server = new Hapi.Server();
|
||||
const server = new Server();
|
||||
|
||||
interface User {
|
||||
username: string;
|
||||
|
||||
6
types/hapi-auth-basic/index.d.ts
vendored
6
types/hapi-auth-basic/index.d.ts
vendored
@@ -5,7 +5,7 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.4
|
||||
|
||||
import * as Hapi from 'hapi';
|
||||
import { Plugin, Request, ResponseToolkit } from 'hapi';
|
||||
|
||||
declare namespace Basic {
|
||||
interface ValidateCustomResponse {
|
||||
@@ -18,10 +18,10 @@ declare namespace Basic {
|
||||
}
|
||||
|
||||
interface Validate {
|
||||
(request: Hapi.Request, username: string, password: string, h: object): Promise<ValidateResponse | ValidateCustomResponse>;
|
||||
(request: Request, username: string, password: string, h: ResponseToolkit): Promise<ValidateResponse | ValidateCustomResponse>;
|
||||
}
|
||||
}
|
||||
|
||||
declare var Basic: Hapi.PluginFunction<{}>;
|
||||
declare var Basic: Plugin<{}>;
|
||||
|
||||
export = Basic;
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
"paths": {
|
||||
"boom": [
|
||||
"boom/v4"
|
||||
],
|
||||
"hapi": [
|
||||
"hapi/v16"
|
||||
]
|
||||
},
|
||||
"noEmit": true,
|
||||
@@ -28,4 +25,4 @@
|
||||
"index.d.ts",
|
||||
"hapi-auth-basic-tests.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user