@@ -29,49 +29,15 @@ export class DatabaseModule {
2929 settingsProvider : ProviderTyped < DatabaseSettingsFactoryContract > ,
3030 isAvailableProvider : ProviderTyped < boolean > ,
3131 databaseCreatorProvider : ProviderTyped < DatabaseCreatorContract > ,
32- databaseMigrationContract ?: Type < DatabaseMigrationContract > ,
33- // providers: Provider[] = []
32+ databaseMigrationContract ?: Type < DatabaseMigrationContract >
3433 ) : ModuleWithProviders {
35- // providers = providers.concat([
3634 const providers : Provider [ ] = [
3735 this . createProvider ( DatabaseSettingsFactoryContract , settingsProvider ) ,
3836 this . createProvider ( IS_AVAILABLE_DATABASE , isAvailableProvider ) ,
39- this . createProvider ( DATABASE_CREATOR , databaseCreatorProvider ) ,
40- // {
41- // provide: DatabaseSettingsFactoryContract,
42- // useClass: settingsProvider
43- // }
37+ this . createProvider ( DATABASE_CREATOR , databaseCreatorProvider )
4438 ] ;
45- // );
4639 return this . forBase ( providers ) ;
4740 }
48- // public static forRoot(
49- // settings: Type<DatabaseSettingsFactoryContract>,
50- // databaseMigrationContract?: Type<DatabaseMigrationContract>,
51- // // providers: Provider[] = []
52- // ): ModuleWithProviders {
53- // // providers = providers.concat([
54- // const providers: Provider[] = [
55- // {
56- // provide: DatabaseSettingsFactoryContract,
57- // useClass: settings
58- // }
59- // ];
60- // return this.forBase(providers);
61- // }
62-
63- // public static forRootValue(
64- // settings: DatabaseSettingsFactoryContract,
65- // databaseMigrationContract?: Type<DatabaseMigrationContract>
66- // ): ModuleWithProviders {
67- // const providers: Provider[] = [
68- // {
69- // provide: DatabaseSettingsFactoryContract,
70- // useValue: settings
71- // }
72- // ];
73- // return this.forBase(providers);
74- // }
7541
7642 private static createProvider ( provide : any , provider : ProviderTyped < any > ) : Provider {
7743 return Object . assign ( {
0 commit comments