This commit is contained in:
IndieKKY
2024-10-06 18:36:23 +08:00
parent 9384c1419a
commit 3e1e69f13e
3 changed files with 19 additions and 11 deletions

11
src/typings.d.ts vendored
View File

@@ -71,6 +71,17 @@ interface InjectDownloadAudioMessage extends InjectMessage<{}> {
type AllInjectMessages = InjectToggleDisplayMessage | InjectFoldMessage | InjectMoveMessage | InjectGetSubtitleMessage | InjectGetVideoStatusMessage | InjectGetVideoElementInfoMessage | InjectRefreshVideoInfoMessage | InjectUpdateTransResultMessage | InjectHideTransMessage | InjectPlayMessage | InjectDownloadAudioMessage
//app
interface AppSetInfosMessage extends AppMessage<{ infos: any }> {
method: 'SET_INFOS';
}
interface AppSetVideoInfoMessage extends AppMessage<{ url: string, title: string, aid: number | null, pages: any, infos: any }> {
method: 'SET_VIDEO_INFO';
}
type AllAPPMessages = AppSetInfosMessage | AppSetVideoInfoMessage
interface MessageResponse<T = any> {
success: boolean;
data?: T;