Skip to content

prodbysolivan/signal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Signal

Type safe event system for efficient callback management.

Description

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.

Dependencies

  • Deno 1.40 or higher

Installing

Add the package to your project directly via JSR or by importing the source files:

deno add @prodbysolivan/signal

Quick Usage

Import 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();

Help

For common issues regarding type definitions, ensure your deno.json is configured correctly and your project is using strict mode.

Authors

Solivan (prodbysolivan)

@solivan

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

About

Type safe event system for efficient callback management.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors