Merge pull request #11886 from ronzeidman/types-2.0

Types 2.0
This commit is contained in:
Yui
2016-11-10 11:35:44 -08:00
committed by GitHub
2 changed files with 6 additions and 4 deletions
+4 -3
View File
@@ -121,10 +121,10 @@ export interface IPOptions {
}
export interface ValidationError extends Error {
message: string;
isJoi: boolean;
details: ValidationErrorItem[];
simple(): string;
annotated(): string;
annotate(): string;
_object: any;
}
export interface ValidationErrorItem {
@@ -132,6 +132,7 @@ export interface ValidationErrorItem {
type: string;
path: string;
options?: ValidationOptions;
context?: any;
}
export interface ValidationResult<T> {
+2 -1
View File
@@ -125,7 +125,8 @@ validErrItem = {
message: str,
type: str,
path: str,
options: validOpts
options: validOpts,
context: obj
};
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---