We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88228d7 commit 4d5be9aCopy full SHA for 4d5be9a
types/lib/sequelize.d.ts
@@ -696,6 +696,13 @@ export class Sequelize extends Hooks {
696
697
public readonly connectionManager: ConnectionManager;
698
699
+ /**
700
+ * Dictionary of all models linked with this instance.
701
+ */
702
+ public readonly models: {
703
+ [key: string]: typeof Model;
704
+ };
705
+
706
/**
707
* Instantiate sequelize with name of database, username and password
708
*
types/test/sequelize.ts
@@ -1,4 +1,4 @@
1
-import { Config, Sequelize } from 'sequelize';
+import { Config, Sequelize, Model } from 'sequelize';
2
3
Sequelize.useCLS({
4
});
@@ -45,3 +45,4 @@ Sequelize.afterConnect(() => {
45
46
47
48
+const myModel: typeof Model = sequelize.models.asd;
0 commit comments