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
79a73954
Commit
79a73954
authored
Dec 04, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
readme
parent
251eaba0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
README.md
README.md
+6
-2
No files found.
README.md
View file @
79a73954
...
@@ -224,8 +224,12 @@ export class MyDatabasePlugin {
...
@@ -224,8 +224,12 @@ export class MyDatabasePlugin {
#### 定义
#### 定义
*
`@Inject(name?: string, options?: Context.Options)`
在插件类某一属性注入特定上下文 Service 。
`name`
默认为类方法名。
*
`@Inject(name?: string, addUsing?: boolean)`
在插件类某一属性注入特定上下文 Service 。
`name`
若为空则默认为类方法名。
`addUsing`
若为
`true`
则会为插件注册的 Service 。
特别的,为了编写简便,如果成员类型也是 Context 则会注入 Koishi 上下文,等效于
`@InjectContext()`
。
特别的,为了编写简便,如果成员类型也是 Context 则会注入 Koishi 上下文,等效于
`@InjectContext()`
。
*
`@Provide(name: string)`
使用该插件提供 Service 。会自动完成 Koishi 的
`Context.service(name)`
声明操作。
*
`@Provide(name: string, options?: ProvideOptions)`
使用该插件提供 Service 。会自动完成 Koishi 的
`Context.service(name)`
声明操作。
*
`immediate`
会在插件加载阶段瞬间完成 Service 注册。
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