Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
Koishi Thirdeye
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
Koishi Thirdeye
Commits
98b45550
Commit
98b45550
authored
May 21, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert if things
parent
80847bda
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
8 deletions
+2
-8
src/decorators.ts
src/decorators.ts
+2
-2
src/def/interfaces.ts
src/def/interfaces.ts
+0
-6
No files found.
src/decorators.ts
View file @
98b45550
...
...
@@ -127,12 +127,12 @@ export const PluginName = (name: string) =>
export
const
If
=
<
T
>
(
func
:
Condition
<
boolean
,
T
,
[
Record
<
string
,
any
>
]
>
,
):
TypedMethodDecorator
<
T
>
=>
):
MethodDecorator
=>
Metadata
.
append
(
'
KoishiControl
'
,
{
type
:
'
if
'
,
condition
:
func
});
export
const
For
=
<
T
>
(
func
:
Condition
<
Iterable
<
Record
<
string
,
any
>>
,
T
,
[
Record
<
string
,
any
>
]
>
,
):
TypedMethodDecorator
<
T
>
=>
):
MethodDecorator
=>
Metadata
.
append
(
'
KoishiControl
'
,
{
type
:
'
for
'
,
condition
:
func
});
export
const
UseModel
=
(...
models
:
ModelClassType
[]):
ClassDecorator
=>
...
...
src/def/interfaces.ts
View file @
98b45550
...
...
@@ -48,12 +48,6 @@ export type MapPluginToConfigWithSelection<M extends Dict<PluginClass>> = {
[
K
in
keyof
M
]:
ClassPluginConfig
<
M
[
K
]
>
&
Selection
;
};
export
type
TypedMethodDecorator
<
T
>
=
<
P
>
(
target
:
T
,
propertyKey
:
string
|
symbol
,
descriptor
:
TypedPropertyDescriptor
<
P
>
,
)
=>
void
;
export
interface
ControlTypeMap
{
if
:
boolean
;
for
:
Iterable
<
Record
<
string
,
any
>>
;
...
...
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