Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
cordis-decorators
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
3rdeye
cordis-decorators
Commits
1474b71d
Commit
1474b71d
authored
Jul 20, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change classification
parent
a13fa723
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
21 deletions
+20
-21
src/decorators/common.ts
src/decorators/common.ts
+2
-1
src/decorators/plugin.ts
src/decorators/plugin.ts
+0
-2
src/registrar.ts
src/registrar.ts
+18
-18
No files found.
src/decorators/common.ts
View file @
1474b71d
import
{
defaultRegistrar
}
from
'
../registrar
'
;
export
const
{
Isolate
,
UsingService
}
=
defaultRegistrar
.
scopeDecorators
();
export
const
{
Isolate
,
UsingService
,
If
,
For
}
=
defaultRegistrar
.
scopeDecorators
();
export
const
{
UsePlugin
,
Apply
}
=
defaultRegistrar
.
methodDecorators
();
src/decorators/plugin.ts
View file @
1474b71d
...
...
@@ -5,8 +5,6 @@ import { PluginRegistrar } from '../plugin-def';
const
pluginDecorators
=
defaultRegistrar
.
pluginDecorators
();
export
const
{
If
,
For
,
PluginName
,
PluginSchema
,
Reusable
,
...
...
src/registrar.ts
View file @
1474b71d
...
...
@@ -453,6 +453,24 @@ export class Registrar<Ctx extends Context> {
scopeDecorators
()
{
return
{
If
:
<
T
>
(
func
:
Condition
<
boolean
,
T
,
[
Record
<
string
,
any
>
]
>
,
):
MethodDecorator
=>
this
.
metadata
.
append
(
'
CordisControl
'
,
{
type
:
'
if
'
,
condition
:
func
,
}),
For
:
<
T
>
(
func
:
Condition
<
Iterable
<
Record
<
string
,
any
>>
,
T
,
[
Record
<
string
,
any
>
]
>
,
):
MethodDecorator
=>
this
.
metadata
.
append
(
'
CordisControl
'
,
{
type
:
'
for
'
,
condition
:
func
,
}),
Isolate
:
(...
services
:
string
[])
=>
this
.
decorateTransformer
((
ctx
,
r
)
=>
ctx
.
isolate
(
r
(
services
))),
UsingService
:
(
...
...
@@ -488,24 +506,6 @@ export class Registrar<Ctx extends Context> {
this
.
metadata
.
set
(
'
CordisPluginReusable
'
,
reusable
),
Fork
:
(
fork
:
PluginRegistrar
.
PluginClass
<
Ctx
>
)
=>
this
.
metadata
.
set
(
'
CordisPluginFork
'
,
fork
),
If
:
<
T
>
(
func
:
Condition
<
boolean
,
T
,
[
Record
<
string
,
any
>
]
>
,
):
MethodDecorator
=>
this
.
metadata
.
append
(
'
CordisControl
'
,
{
type
:
'
if
'
,
condition
:
func
,
}),
For
:
<
T
>
(
func
:
Condition
<
Iterable
<
Record
<
string
,
any
>>
,
T
,
[
Record
<
string
,
any
>
]
>
,
):
MethodDecorator
=>
this
.
metadata
.
append
(
'
CordisControl
'
,
{
type
:
'
for
'
,
condition
:
func
,
}),
Provide
:
(
name
:
string
,
options
?:
Registrar
.
ProvideOptions
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment