d69a6a4517b26d928d63618bed2566257ac82dba66713ed040a33d2a682992ad975fff38057a4f3a2e3952c02642ec0755ff2449fbc6585db772f4f667edf7 991 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. export type HMRPayload =
  2. | ConnectedPayload
  3. | UpdatePayload
  4. | FullReloadPayload
  5. | CustomPayload
  6. | ErrorPayload
  7. | PrunePayload
  8. export interface ConnectedPayload {
  9. type: 'connected'
  10. }
  11. export interface UpdatePayload {
  12. type: 'update'
  13. updates: Update[]
  14. }
  15. export interface Update {
  16. type: 'js-update' | 'css-update'
  17. path: string
  18. acceptedPath: string
  19. timestamp: number
  20. /**
  21. * @experimental internal
  22. */
  23. explicitImportRequired?: boolean | undefined
  24. }
  25. export interface PrunePayload {
  26. type: 'prune'
  27. paths: string[]
  28. }
  29. export interface FullReloadPayload {
  30. type: 'full-reload'
  31. path?: string
  32. }
  33. export interface CustomPayload {
  34. type: 'custom'
  35. event: string
  36. data?: any
  37. }
  38. export interface ErrorPayload {
  39. type: 'error'
  40. err: {
  41. [name: string]: any
  42. message: string
  43. stack: string
  44. id?: string
  45. frame?: string
  46. plugin?: string
  47. pluginCode?: string
  48. loc?: {
  49. file?: string
  50. line: number
  51. column: number
  52. }
  53. }
  54. }