config.ts
23 lines
| 743 B
| video/mp2t
|
TypeScriptLexer
|
|
r124 | import { configure, dependency, Services, $type } from "./services"; | ||
|
|
r123 | import { Foo } from "./Foo"; | ||
| import { Bar } from "./Bar"; | ||||
|
|
r124 | import { Box } from "./Box"; | ||
|
|
r110 | |||
|
|
r123 | export const config = configure() | ||
| .register("bar", { $from: import("./Bar"), service: "service" }) | ||||
|
|
r124 | // .register("box", { $from: import("./Box") }) | ||
|
|
r123 | .register("host", "example.com") | ||
|
|
r124 | // .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")); | ||||
