(deps?: any, callback?: any)
| 62 | } |
| 63 | |
| 64 | accept(deps?: any, callback?: any): void { |
| 65 | if (typeof deps === 'function' || !deps) { |
| 66 | // self-accept: hot.accept(() => {}) |
| 67 | this.acceptDeps([this.ownerPath], ([mod]) => deps?.(mod)) |
| 68 | } else if (typeof deps === 'string') { |
| 69 | // explicit deps |
| 70 | this.acceptDeps([deps], ([mod]) => callback?.(mod)) |
| 71 | } else if (Array.isArray(deps)) { |
| 72 | this.acceptDeps(deps, callback) |
| 73 | } else { |
| 74 | throw new Error(`invalid hot.accept() usage.`) |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | // export names (first arg) are irrelevant on the client side, they're |
| 79 | // extracted in the server for propagation |
nothing calls this directly
no test coverage detected