# ste-signals

> Add the power of Signals to your projects. They are the most bare bones implementation of an event.

Latest version **4.0.0** (published 2026-10-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install ste-signals
pnpm add ste-signals
yarn add ste-signals
bun add ste-signals
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2026-10-11 |
| First published | 2018-03-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=22.22.2 |
| Dependencies | 1 |
| Unpacked size | 10.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Kees C. Bakker |
| Maintainers | keestalkstech |
| Keywords | signals, events, event, strongly, typed, typescript, DotNet |

## Links

- npm: https://www.npmjs.com/package/ste-signals
- Repository: https://github.com/KeesCBakker/Strongly-Typed-Events-for-TypeScript
- Homepage: https://github.com/KeesCBakker/Strongly-Typed-Events-for-TypeScript#readme
- Issues: https://github.com/KeesCBakker/Strongly-Typed-Events-for-TypeScript/issues
- npm.io page: https://npm.io/package/ste-signals

## Dependencies (1)

- [ste-core](https://npm.io/package/ste-core.md) ^4.0.0

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 4.0.0 (latest) — 2026-10-11
- 3.0.11 — 2023-08-09
- 3.0.9 — 2023-01-24
- 3.0.8 — 2023-01-11
- 3.0.7 — 2022-10-29
- 3.0.6 — 2022-10-12
- 3.0.5 — 2022-09-01
- 3.0.4 — 2022-09-01
- 3.0.3 — 2022-06-14
- 3.0.2 — 2022-05-02
- 3.0.1 — 2022-03-23
- 2.1.16 — 2022-03-02
- 2.1.14 — 2021-11-10
- 2.1.13 — 2021-09-30
- 2.1.12 — 2021-09-28
- … 62 more at https://npm.io/package/ste-signals/versions

## README

# Strongly Typed Events - Signals
Signals are the most barebone of all <a href="https://www.npmjs.com/package/strongly-typed-events">events</a>. They don't contain
any data. They just invoke the registered handler. 

Version 4.0.0 requires Node.js 22.22.2 or newer.

[![npm version](https://badge.fury.io/js/ste-signals.svg)](https://badge.fury.io/js/ste-signals)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)


### Subscription made easy
An example says more than a 1000 words. Imagine if you have events like this on your class:
```typescript
let clock = new Clock("Smu", 1000);

//log the ticks to the console - this is a signal event
clock.onTick.subscribe(() => console.log("Tick!"));

```

### Events made easy
So let's look at the implementation from a TypeScript perspective. (Do you program NodeJs without typescript? <a href="https://github.com/KeesCBakker/Strongly-Typed-Events-for-TypeScript/blob/master/documentation/HowToUseInNodeJs.md">Check this</a>)

```typescript
import { SignalDispatcher } from "ste-signals";

class Clock {
  private _onTick = new SignalDispatcher();
  private _ticks: number = 0;

  constructor(public name: string, timeout: number) {
    setInterval(() => {
      this._ticks += 1;
      this._onTick.dispatch();
    }, timeout);
  }

  public get onTick() {
    return this._onTick.asEvent();
  }
}
```

Check the <a href="https://github.com/KeesCBakker/Strongly-Typed-Events-for-TypeScript/tree/master/documentation">documentation</a> or the <a href="https://github.com/KeesCBakker/Strongly-Typed-Events-for-TypeScript/tree/master/examples">examples</a> for more information.

Need more info? Check the <a href="https://github.com/KeesCBakker/Strongly-Typed-Events-for-TypeScript">repo</a>.

## Maintenance
This project is maintained by <a href="https://keestalkstech.com/">Kees C. Bakker</a>.

---
_Source: https://npm.io/package/ste-signals · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
