From 0d3e55398e5f631856ea20b73fda270ff0f00350 Mon Sep 17 00:00:00 2001 From: James O'Cull Date: Tue, 3 Nov 2015 15:46:39 -0500 Subject: [PATCH 1/2] Added optional type information for the Sequelize's import define function --- sequelize/sequelize.d.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sequelize/sequelize.d.ts b/sequelize/sequelize.d.ts index a0a567eca..3a80498c0 100644 --- a/sequelize/sequelize.d.ts +++ b/sequelize/sequelize.d.ts @@ -5442,8 +5442,11 @@ declare module "sequelize" { * * @param path The path to the file that holds the model you want to import. If the part is relative, it * will be resolved relatively to the calling file + * + * @param defineFunction An optional function that provides model definitions. Useful if you do not + * want to use the module root as the define function */ - import( path : string ) : Model; + import( path : string, defineFunction? : (Sequelize, DataTypes) => Model ) : Model; /** * Execute a query on the DB, with the posibility to bypass all the sequelize goodness. From 037b4c0597a37be9af7e91c54724be7a28dd6588 Mon Sep 17 00:00:00 2001 From: James O'Cull Date: Thu, 5 Nov 2015 10:18:02 -0500 Subject: [PATCH 2/2] Fixing incorrect function declaration syntax --- sequelize/sequelize.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sequelize/sequelize.d.ts b/sequelize/sequelize.d.ts index 3a80498c0..0a151c60f 100644 --- a/sequelize/sequelize.d.ts +++ b/sequelize/sequelize.d.ts @@ -5446,7 +5446,7 @@ declare module "sequelize" { * @param defineFunction An optional function that provides model definitions. Useful if you do not * want to use the module root as the define function */ - import( path : string, defineFunction? : (Sequelize, DataTypes) => Model ) : Model; + import( path : string, defineFunction? : (sequelize: Sequelize, dataTypes: DataTypes) => Model ) : Model; /** * Execute a query on the DB, with the posibility to bypass all the sequelize goodness.