first commit

This commit is contained in:
编码猿
2024-09-27 01:24:57 +08:00
commit b6fac0aad8
16 changed files with 252 additions and 0 deletions

20
test.ts Normal file
View File

@@ -0,0 +1,20 @@
import { Inject, Injectable } from "bmydi";
@Injectable()
class Demo1 {
public hello: string = "我是Demo1类"
}
class Demo2 {
@Inject()
public test!: Demo1;
public GetTest(): string {
return this.test.hello // 返回:"我是Demo1类"
}
}
var a = new Demo2();
console.log(a.GetTest());