Create an event that can be subscribed to, which is the function itself.
import { event, send } from "@wopjs/event";const onDidChange = event<string>();const dispose = onDidChange((data) => console.log(data));send(onDidChange, "data") Copy
import { event, send } from "@wopjs/event";const onDidChange = event<string>();const dispose = onDidChange((data) => console.log(data));send(onDidChange, "data")
Create an event that can be subscribed to, which is the function itself.
Example