https://github.com/danieliusdev/events.ts
https://github.com/danieliusdev/events.ts
Last synced: 28 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/danieliusdev/events.ts
- Owner: DanieliusDev
- Created: 2022-07-01T00:43:17.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-04-13T23:53:55.000Z (almost 3 years ago)
- Last Synced: 2025-10-20T19:58:26.681Z (6 months ago)
- Language: TypeScript
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Events.ts
Events.ts is a [Deno](https://deno.land) module that implements typings to the [Node.js](https://nodejs.org) [event emtter](https://nodejs.org/api/events.html#class-eventemitter).
## Example
```sh
deno run https://deno.land/x/events_ts/example.ts
```
or
```ts
import EventEmitter from 'https://deno.land/x/events_ts/mod.ts';
const emitter = new EventEmitter<{ message: [message: string] }>();
emitter.on('message', console.log);
emitter.emit('message', 'Hello, World!');
```