-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow inject proto and name #40
Conversation
Codecov Report
@@ Coverage Diff @@
## master #40 +/- ##
==========================================
+ Coverage 92.00% 92.02% +0.02%
==========================================
Files 196 196
Lines 3950 3960 +10
Branches 378 384 +6
==========================================
+ Hits 3634 3644 +10
Misses 315 315
Partials 1 1
Continue to review full report at Codecov.
|
@Inject(TestService)
testService: TestService; 这样代码太冗余了。 |
改成只支持传 name 的简写了 |
@killagu 再看一下? |
core/core-decorator/test/fixtures/decators/QualifierCacheService.ts
Outdated
Show resolved
Hide resolved
@Inject() | ||
foo: Foo; | ||
export class Foo extends Base { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
加了 emitDecoratorMetadata ,下面的引用编译成 js 也实际存在了,所以这里顺序要改到引用前面
ea43087
to
da341fd
Compare
加上 design:type 的支持了,@killagu 再看一下? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Checklist
npm test
passesAffected core subsystem(s)
优化 Inject 逻辑,让 Inject 更简单易用,可以直接 Inject name ,也支持通过 design:type 来获取 protoClass
Description of change