style: 强类型大法
This commit is contained in:
1 parent
76501bae34
commit
70945cf2d8
191 files changed
+923
-806
No files matched your search
@@ -1,12 +1,15 @@
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
|
||||
import { napCatVersion } from '@/common/version';
|
||||
interface ResponseType {
|
||||
app_name: string;
|
||||
protocol_version: string;
|
||||
app_version: string;
|
||||
}
|
||||
export default class GetVersionInfo extends OneBotAction<void, ResponseType> {
|
||||
override actionName = ActionName.GetVersionInfo;
|
||||
|
||||
export default class GetVersionInfo extends OneBotAction<any, any> {
|
||||
actionName = ActionName.GetVersionInfo;
|
||||
|
||||
async _handle(payload: any): Promise<any> {
|
||||
async _handle(): Promise<ResponseType> {
|
||||
return {
|
||||
app_name: 'NapCat.Onebot',
|
||||
protocol_version: 'v11',
|
||||
|
||||
Reference in new issue
Block a user