hmrPayload.d.ts 826 B

123456789101112131415161718192021222324252627282930313233
  1. export declare type HMRPayload = ConnectedPayload | UpdatePayload | FullReloadPayload | StyleRemovePayload | SWBustCachePayload | CustomPayload | MultiUpdatePayload;
  2. interface ConnectedPayload {
  3. type: 'connected';
  4. }
  5. export interface UpdatePayload {
  6. type: 'js-update' | 'vue-reload' | 'vue-rerender' | 'style-update';
  7. path: string;
  8. changeSrcPath: string;
  9. timestamp: number;
  10. }
  11. interface StyleRemovePayload {
  12. type: 'style-remove';
  13. path: string;
  14. id: string;
  15. }
  16. interface FullReloadPayload {
  17. type: 'full-reload';
  18. path: string;
  19. }
  20. interface SWBustCachePayload {
  21. type: 'sw-bust-cache';
  22. path: string;
  23. }
  24. interface CustomPayload {
  25. type: 'custom';
  26. id: string;
  27. customData: any;
  28. }
  29. export interface MultiUpdatePayload {
  30. type: 'multi';
  31. updates: UpdatePayload[];
  32. }
  33. export {};