Urara-Blog/node_modules/.pnpm-store/v3/files/7c/c02e345fcf46dfe989c8f23c212c61f0afff8be088016f9299d5549e0dd903617219ed73f3639204a7101bd596df17f15001b2b3fdb3d7519fcb8708f64242
2022-08-14 01:14:53 +08:00

57 lines
904 B
Text

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
}
}
}