Type alias ListenTo<EventMap>

ListenTo<EventMap>: Pick<EventEmitter<EventMap>, "addListener" | "removeListener" | "on" | "off">

Events interface.

Subscribe to events using on and unsubscribe using off, alternatively you can use addListener and removeListener.

program.fileSystem.on("local-change", ({ path, root }) => {
console.log("The file system has changed locally 🔔")
console.log("Changed path:", path)
console.log("New data root CID:", root)
})

program.fileSystem.off("publish")

Type Parameters

  • EventMap

Generated using TypeDoc