We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
using
插件可以使用 using 属性标注服务依赖 (https://koishi.chat/zh-CN/guide/plugin/service.html#using-属性) 但是在 TS 5.2 中是关键字 (https://www.google.com.hk/search?q=typescript+using)
以后 JS 估计也有 https://github.com/tc39/proposal-explicit-resource-management
创建一个 Koishi 插件 使用 using 声明服务依赖
// src/index.ts import { Context } from 'koishi' export const using = ['keine'] // some Syntax Error here export function apply(ctx: Context) { /* do something... */ }
有一个方法可以声明服务依赖,不使用类插件
No response
The text was updated successfully, but these errors were encountered:
Temporary workaround:
const _using = [] export { _using as using }
Sorry, something went wrong.
feat: replace using with inject
inject
6c170cf
See: - koishijs/koishi#1228 - https://github.com/tc39/proposal-explicit-resource-management
13b6cdd
cordis 更了可以 close 了吧(
新版将使用 inject 代替 using cordiverse/cordis@13b6cdd
// Example export const inject = ['keine']
也行
No branches or pull requests
Describe the bug
插件可以使用 using 属性标注服务依赖 (https://koishi.chat/zh-CN/guide/plugin/service.html#using-属性)
但是在 TS 5.2 中是关键字
(https://www.google.com.hk/search?q=typescript+using)
以后 JS 估计也有
https://github.com/tc39/proposal-explicit-resource-management
Steps to reproduce
创建一个 Koishi 插件
使用 using 声明服务依赖
Expected behavior
有一个方法可以声明服务依赖,不使用类插件
Screenshots
Versions
Additional context
No response
The text was updated successfully, but these errors were encountered: