Type safe event system for efficient callback management.
A modular and lightweight signal implementation built with TypeScript. It provides a robust event-driven architecture with strict typing, enabling developers to manage listener lifecycles, handle persistent connections, and decouple component communication.
- Deno 1.40 or higher
Add the package to your project directly via JSR or by importing the source files:
deno add @prodbysolivan/signalImport the Signal class and Connection type into your project:
import { Signal, type Connection } from "@prodbysolivan/signal";
const mySignal = new Signal<[string]>();
const connection = mySignal.connect((message) => {
console.log(message);
});
mySignal.fire("Hello, World!");
connection.disconnect();For common issues regarding type definitions, ensure your deno.json is configured correctly and your project is using strict mode.
Solivan (prodbysolivan)
This project is licensed under the MIT License - see the LICENSE file for details.