pw-ext-hook.d.ts 436 B

123456789101112131415161718192021
  1. interface PWExtensionRequestInfo {
  2. method: string
  3. url: string
  4. data: any & { wantsBinary: boolean }
  5. }
  6. interface PWExtensionResponse {
  7. data: any
  8. config?: {
  9. timeData?: {
  10. startTime: number
  11. endTime: number
  12. }
  13. }
  14. }
  15. interface PWExtensionHook {
  16. getVersion: () => { major: number; minor: number }
  17. sendRequest: (req: PWExtensionRequestInfo) => Promise<PWExtensionResponse>
  18. cancelRunningRequest: () => void
  19. }