Skip to content

Commit d2a1bfb

Browse files
committed
Added post create
1 parent e7bf06c commit d2a1bfb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/tests/di-tests/di-tests.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Inject, { RegisterSingleton, ServiceProvider } from "../../di/di.js";
1+
import Inject, { RegisterSingleton, ServiceObject, ServiceProvider } from "../../di/di.js";
22

33
const services = new ServiceProvider();
44

@@ -17,12 +17,12 @@ class Branch {
1717
}
1818

1919
@RegisterSingleton
20-
class Leaf {
20+
class Leaf extends ServiceObject {
2121
@Inject branch: Branch;
2222

2323
leaf: string;
2424

25-
constructor() {
25+
postInit() {
2626
this.leaf = this.branch.branchRoot.root + " -> " +this.branch.branch + " -> leaf";
2727
}
2828
}

0 commit comments

Comments
 (0)