-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wanghx
committed
Jul 1, 2022
1 parent
e072e6c
commit da341fd
Showing
10 changed files
with
78 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 20 additions & 3 deletions
23
core/core-decorator/test/fixtures/decators/CacheService.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,40 @@ | ||
import { ContextProto, Inject } from '../../..'; | ||
import { ICache } from './ICache'; | ||
import { TestService, TestService2 } from './OtherService'; | ||
|
||
@ContextProto() | ||
export class TestService { | ||
export class TestService3 { | ||
sayHi() { | ||
console.info('hi'); | ||
} | ||
} | ||
|
||
@ContextProto() | ||
export class TestService4 { | ||
sayHi() { | ||
console.info('hi'); | ||
} | ||
} | ||
|
||
|
||
@ContextProto() | ||
export default class CacheService { | ||
static fileName = __filename; | ||
|
||
@Inject({ | ||
name: 'fooCache', | ||
proto: 'ICache', | ||
} as any) | ||
}) | ||
cache: ICache; | ||
|
||
@Inject('testService') | ||
testService: TestService; | ||
|
||
@Inject() | ||
testService2: TestService2; | ||
|
||
@Inject() | ||
otherService: TestService3; | ||
|
||
@Inject() | ||
testService4: any; | ||
} |
15 changes: 15 additions & 0 deletions
15
core/core-decorator/test/fixtures/decators/OtherService.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { ContextProto } from '../../..'; | ||
|
||
@ContextProto() | ||
export class TestService { | ||
sayHi() { | ||
console.info('hi'); | ||
} | ||
} | ||
|
||
@ContextProto({ name: 'abcabc' }) | ||
export class TestService2 { | ||
sayHi() { | ||
console.info('hi'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters