diff --git a/sequelize/sequelize.d.ts b/sequelize/sequelize.d.ts index 0a151c60f..9b5e935bf 100644 --- a/sequelize/sequelize.d.ts +++ b/sequelize/sequelize.d.ts @@ -1994,7 +1994,7 @@ declare module "sequelize" { INITIALLY_IMMEDIATE: DeferrableInitiallyImmediate; NOT: DeferrableNot; SET_DEFERRED: DeferrableSetDeferred; - SET_IMMEDIATE: DeferrableSetImmediate + SET_IMMEDIATE: DeferrableSetImmediate; } // @@ -2007,7 +2007,7 @@ declare module "sequelize" { /** * The Base Error all Sequelize Errors inherit from. */ - interface BaseError extends ErrorConstructor { } + interface BaseError extends Error, ErrorConstructor { } interface ValidationError extends BaseError { @@ -2026,7 +2026,10 @@ declare module "sequelize" { * @param path The path to be checked for error items */ get( path : string ) : Array; - + + /** Array of ValidationErrorItem objects describing the validation errors */ + errors : Array; + } interface ValidationErrorItem extends BaseError { @@ -2041,7 +2044,19 @@ declare module "sequelize" { * @param value The value that generated the error */ new ( message : string, type : string, path : string, value : string ) : ValidationErrorItem; - + + /** An error message */ + message : string; + + /** The type of the validation error */ + type : string; + + /** The field that triggered the validation error */ + path : string; + + /** The value that generated the error */ + value : string; + } interface DatabaseError extends BaseError { @@ -2790,7 +2805,7 @@ declare module "sequelize" { * * @param options.skip An array of strings. All properties that are in this array will not be validated */ - validate( options? : { skip?: Array } ) : Promise; + validate( options? : { skip?: Array } ) : Promise; /** * This is the same as calling `set` and then calling `save`. @@ -5571,7 +5586,7 @@ declare module "sequelize" { * @param options Query Options for authentication */ authenticate( options? : QueryOptions ) : Promise; - validate( options? : QueryOptions ) : Promise; + validate( options? : QueryOptions ) : Promise; /** * Start a transaction. When using transactions, you should pass the transaction in the options argument