mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* [Hapi] Fix input and response validation function signatures Fixes #16750 * [Hapi] Allow custom validation options in route input and response * [Hapi] Adjust validation contexts to match Hapi version 16.1.1 * [Hapi] Adjust test/route/validate.ts to match newest changes * [Hapi] Add custom options to response validation test * [Hapi] Update TypeScript version to 2.3 in packages that import Hapi * [Hapi] Clarify documentation on validation function value, allow null
22 lines
624 B
TypeScript
22 lines
624 B
TypeScript
// Type definitions for hapi 4.2
|
|
// Project: https://github.com/hapijs/hapi-auth-basic
|
|
// Definitions by: AJP <https://github.com/AJamesPhillips>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.3
|
|
|
|
import * as Hapi from 'hapi';
|
|
|
|
declare namespace Basic {
|
|
interface ValidateFuncCallback {
|
|
(err: Error | null, isValid: boolean, userCredentials?: any): void;
|
|
}
|
|
|
|
interface ValidateFunc {
|
|
(request: Hapi.Request, username: string, password: string, callback: ValidateFuncCallback): void;
|
|
}
|
|
}
|
|
|
|
declare var Basic: Hapi.PluginFunction<{}>;
|
|
|
|
export = Basic;
|