Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @InversifyRootModule({
- imports: [
- ModuleWithoutConfiguration,
- ModuleWithConfiguration.configure({ foo: 'bar' })
- ]
- })
- class RootModule {}
- class ModuleWithoutConfiguration {
- public static getModule(): ModuleLoadResult {
- return new InversifyModule(...);
- }
- }
- class ModuleWithConfiguration {
- public static configure(opts: { foo: string }): ModuleWithOptionsDescriptor {
- return {
- getModule(): ModuleLoadResult {
- return {
- inversifyModule: new ContainerModule(...);
- };
- },
- moduleType: Module2,
- } as InversifyChildModule;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement