style: 强类型大法
This commit is contained in:
1 parent
ac193cc94a
commit
15854c605b
191 files changed
+923
-806
No files matched your search
@@ -1,10 +1,10 @@
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
|
||||
export class GetCSRF extends OneBotAction<any, any> {
|
||||
actionName = ActionName.GetCSRF;
|
||||
export class GetCSRF extends OneBotAction<void, { token: number }> {
|
||||
override actionName = ActionName.GetCSRF;
|
||||
|
||||
async _handle(payload: any) {
|
||||
async _handle() {
|
||||
const sKey = await this.core.apis.UserApi.getSKey();
|
||||
if (!sKey) {
|
||||
throw new Error('SKey is undefined');
|
||||
|
||||
Reference in new issue
Block a user