##// END OF EJS Templates
working on container configuration dsl
working on container configuration dsl

File last commit:

r124:b58fedd83580 ioc ts support
r124:b58fedd83580 ioc ts support
Show More
config.ts
23 lines | 743 B | video/mp2t | TypeScriptLexer
import { configure, dependency, Services, $type } from "./services";
import { Foo } from "./Foo";
import { Bar } from "./Bar";
import { Box } from "./Box";
export const config = configure()
.register("bar", { $from: import("./Bar"), service: "service" })
// .register("box", { $from: import("./Box") })
.register("host", "example.com")
// .registerType("bar2", Bar, [{ foo: dependency("foo"), host: "" }]);
.register("bar2", $type(Bar,
{
foo: $type(Foo)
.override("host", "foo.example.com")
.inject("setName", dependency("host"))
.activate("context"),
host: ""
},
"")
)
.registerType("box", Box, dependency("bar"));