-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
/
hmrPayload.d.ts
72 lines (64 loc) · 1.2 KB
/
hmrPayload.d.ts
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/** @deprecated use HotPayload */
export type HMRPayload = HotPayload
export type HotPayload =
| ConnectedPayload
| PingPayload
| UpdatePayload
| FullReloadPayload
| CustomPayload
| ErrorPayload
| PrunePayload
export interface ConnectedPayload {
type: 'connected'
}
export interface PingPayload {
type: 'ping'
}
export interface UpdatePayload {
type: 'update'
updates: Update[]
}
export interface Update {
type: 'js-update' | 'css-update'
path: string
acceptedPath: string
timestamp: number
/** @internal */
explicitImportRequired?: boolean
/** @internal */
isWithinCircularImport?: boolean
/** @internal */
invalidates?: string[]
}
export interface PrunePayload {
type: 'prune'
paths: string[]
}
export interface FullReloadPayload {
type: 'full-reload'
path?: string
/** @internal */
triggeredBy?: 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
}
}
}