##// END OF EJS Templates
working on fluent configuration
working on fluent configuration

File last commit:

r133:09ea4b9e3735 ioc ts support
r133:09ea4b9e3735 ioc ts support
Show More
config.ts
20 lines | 763 B | video/mp2t | TypeScriptLexer
cin
working on fluent configuration
r133 import { configure } from "./services";
cin
dependency builder proposal
r110
cin
fluent configuration interfaces
r127 export const config = configure()
cin
working on fluent configuration
r133 .register("host", s => s.value("example.com"))
.register("bar2", bar2 => Promise.all([import("./Foo"), import("./Bar")])
.then(([{ Foo }, { Bar }]) => {
const lifetime: any = undefined; // new HierarchyLifetime()
bar2.factory((resolve, activate) => {
const bar = new Bar({
foo: activate(lifetime, () => new Foo()),
nested: {
lazy: resolve("foo", { lazy: true })
},
host: resolve("host")
}, "some text");
bar.setName(resolve("host"));
return bar;
});
})
cin
working on fluent container configuration
r125 );