##// END OF EJS Templates
working on lifetime management
working on lifetime management

File last commit:

r128:882b53b2ba5b ioc ts support
r129:c13384c6c1ac ioc ts support
Show More
config.ts
17 lines | 701 B | video/mp2t | TypeScriptLexer
import { configure, dependency, build } from "./services";
export const config = configure()
.register("bar", async s => s.wired(await import("./Bar"), "service"))
.register("box", s => import("./Box").then(m => s.wired(m)))
.register("host", "example.com")
// .registerType("bar2", Bar, [{ foo: dependency("foo"), host: "" }]);
.register("bar2", async s => s.type((await import("./Bar")).Bar,
{
foo: build().type((await import("./Foo")).Foo)
.activate("context"),
nested: { lazy: dependency("foo", { lazy: true }) },
host: dependency("host")
},
"")
.inject("setName", dependency("host"))
);