Adrià Vilanova MartÃnez | 43c7520 | 2024-10-19 15:55:15 +0200 | [diff] [blame^] | 1 | import { NodeWatcherHandler } from "./NodeWatcherHandler"; |
| 2 | |
| 3 | export interface NodeWatcherPort { |
| 4 | /** |
| 5 | * Start watching mutations to nodes. |
| 6 | */ |
| 7 | start(): void; |
| 8 | |
| 9 | /** |
| 10 | * Pause watching mutations to nodes. |
| 11 | */ |
| 12 | pause(): void; |
| 13 | |
| 14 | /** |
| 15 | * Add a handler to watch certain mutations. |
| 16 | */ |
| 17 | setHandler(key: string, handler: NodeWatcherHandler): void; |
| 18 | |
| 19 | /** |
| 20 | * Remove a handler by key. |
| 21 | */ |
| 22 | removeHandler(key: string): boolean; |
| 23 | } |