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