From 1b6bcc7da5085463899716bd323e5b99316817f2 Mon Sep 17 00:00:00 2001 From: Alexander James Phillips Date: Tue, 9 Feb 2016 23:07:27 +0000 Subject: [PATCH] DataTypeDate accepts length parameter option --- sequelize/sequelize-tests.ts | 1 + sequelize/sequelize.d.ts | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/sequelize/sequelize-tests.ts b/sequelize/sequelize-tests.ts index 15010e5447f75d..b7a04761f0c773 100644 --- a/sequelize/sequelize-tests.ts +++ b/sequelize/sequelize-tests.ts @@ -486,6 +486,7 @@ Sequelize.CHAR( 12 ).BINARY; Sequelize.CHAR.BINARY; Sequelize.BOOLEAN; Sequelize.DATE; +Sequelize.DATE(6); Sequelize.UUID; Sequelize.UUIDV1; Sequelize.UUIDV4; diff --git a/sequelize/sequelize.d.ts b/sequelize/sequelize.d.ts index 8f803a8b64bb19..0bf3d6d9e24340 100644 --- a/sequelize/sequelize.d.ts +++ b/sequelize/sequelize.d.ts @@ -1736,7 +1736,15 @@ declare module "sequelize" { interface DataTypeTime extends DataTypeAbstract { } - interface DataTypeDate extends DataTypeAbstract { } + interface DataTypeDate extends DataTypeAbstract { + + /** + * Length of decimal places of time + */ + ( options? : { length?: number } ) : DataTypeDate; + ( length? : number) : DataTypeDate; + + } interface DataTypeDateOnly extends DataTypeAbstract { }