mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-01 08:10:25 +00:00
feat: attempt to enhance type inference
This commit is contained in:
@@ -29,7 +29,7 @@ export class OB11Response {
|
||||
}
|
||||
|
||||
export abstract class OneBotAction<PayloadType, ReturnDataType> {
|
||||
actionName: ActionName = ActionName.Unknown;
|
||||
actionName: typeof ActionName[keyof typeof ActionName] = ActionName.Unknown;
|
||||
core: NapCatCore;
|
||||
private validate: ValidateFunction<any> | undefined = undefined;
|
||||
payloadSchema: any = undefined;
|
||||
@@ -84,4 +84,4 @@ export abstract class OneBotAction<PayloadType, ReturnDataType> {
|
||||
}
|
||||
|
||||
abstract _handle(payload: PayloadType, adaptername: string): PromiseLike<ReturnDataType>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user