Function
on
(event: DebugEventType, handler: DebugRecordHandler | DebugErrorHandler)
Source from the content-addressed store, hash-verified
| 712 | } |
| 713 | |
| 714 | function on(event: DebugEventType, handler: DebugRecordHandler | DebugErrorHandler): () => void { |
| 715 | if (event === "record") { |
| 716 | const h = handler as DebugRecordHandler; |
| 717 | recordHandlers.add(h); |
| 718 | return () => { |
| 719 | recordHandlers.delete(h); |
| 720 | }; |
| 721 | } |
| 722 | |
| 723 | if (event === "error") { |
| 724 | return errorAggregator.on("error", handler as DebugErrorHandler); |
| 725 | } |
| 726 | |
| 727 | return () => {}; |
| 728 | } |
| 729 | |
| 730 | return { |
| 731 | enable, |
Callers
nothing calls this directly
Tested by
no test coverage detected