# @types/sweet-pubsub

> TypeScript definitions for sweet-pubsub

Latest version **1.1.2** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/sweet-pubsub
pnpm add @types/sweet-pubsub
yarn add @types/sweet-pubsub
bun add @types/sweet-pubsub
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2023-11-07 |
| First published | 2022-01-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51432 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/sweet-pubsub
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sweet-pubsub
- npm.io page: https://npm.io/package/@types/sweet-pubsub

## Recent versions

- 1.1.2 (latest) — 2023-11-07
- 1.1.0 (ts3.8) — 2022-01-06
- 1.1.1 — 2023-10-18

## README

# Installation
> `npm install --save @types/sweet-pubsub`

# Summary
This package contains type definitions for sweet-pubsub (https://github.com/oldboyxx/sweet-pubsub).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sweet-pubsub.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sweet-pubsub/index.d.ts)
````ts
interface SweetPubsub {
    on<CBFn extends (...args: any[]) => unknown>(
        topic: string,
        unsubscribeLabel: string,
        callback: CBFn,
        priority?: number,
    ): CBFn;
    on<CBFn extends (...args: any[]) => unknown>(topic: string, callback: CBFn, priority?: number): CBFn;
    sub<CBFn extends (...args: any[]) => unknown>(
        topic: string,
        unsubscribeLabel: string,
        callback: CBFn,
        priority?: number,
    ): CBFn;
    sub<CBFn extends (...args: any[]) => unknown>(topic: string, callback: CBFn, priority?: number): CBFn;
    once<CBFn extends (...args: any[]) => unknown>(
        topic: string,
        unsubscribeLabel: string,
        callback: CBFn,
        priority?: number,
    ): CBFn;
    once<CBFn extends (...args: any[]) => unknown>(topic: string, callback: CBFn, priority?: number): CBFn;
    subOnce<CBFn extends (...args: any[]) => unknown>(
        topic: string,
        unsubscribeLabel: string,
        callback: CBFn,
        priority?: number,
    ): CBFn;
    subOnce<CBFn extends (...args: any[]) => unknown>(
        topic: string,
        callback: CBFn,
        priority?: number,
    ): CBFn;
    emit(topic: string, ...arguments: any[]): unknown;
    pub(topic: string, ...arguments: any[]): unknown;
    emits(topic: string, ...arguments: any[]): unknown;
    pubs(topic: string, ...arguments: any[]): unknown;
    off(callback: (...args: any[]) => unknown): unknown[];
    off(topicOrUnsubscribeLabel: string, callback?: (...args: any[]) => unknown): unknown[];
    off(topic: string, unsubscribeLabel: string): unknown[];
    unsub(callback: (...args: any[]) => unknown): unknown[];
    unsub(topicOrUnsubscribeLabel: string, callback?: (...args: any[]) => unknown): unknown[];
    unsub(topic: string, unsubscribeLabel: string): unknown[];
}

declare const sweetPubsub: SweetPubsub;

export = sweetPubsub;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: none

# Credits
These definitions were written by [Emilio Escobar](https://github.com/emilioivan12).

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