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