Skip to content

Commit

Permalink
feat: support multiple data sources config (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
microud authored and dead-horse committed Jan 7, 2019
1 parent 15f08dd commit 69c5750
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import * as sequelize from "sequelize";

interface EggSequelizeOptions extends sequelize.Options {
delegate?: string;
baseDir?: string;
}

interface DataSources {
[datasources]: EggSequelizeOptions;
}

declare module 'egg' {

// extend app
Expand All @@ -15,7 +24,7 @@ declare module 'egg' {

// extend your config
interface EggAppConfig {
sequelize: sequelize.Options;
sequelize: EggSequelizeOptions | DataSources;
}

}

0 comments on commit 69c5750

Please sign in to comment.