Any class that wants to use the PubSub bus needs to extend this class. No one should use PubSub directly!!

### Hierarchy

- default

## Index

### Constructors

- constructor

### Properties

- subscriptionTokens

### Methods

- makeNamespace
- publish
- publishNamespaced
- subscribe
- subscribeNamespaced
- unsubscribeAll

## Constructors

### constructor

- new default(): default

- #### Returns default

## Properties

### Private subscriptionTokens

subscriptionTokens: string[] = []

- Defined in pub-sub/PubSub.ts:9

## Methods

### Private makeNamespace

- makeNamespace(namespace: string, event: Events): string

- - Defined in pub-sub/PubSub.ts:43

  #### Parameters

  - ##### namespace: string

  - ##### event: Events

  #### Returns string

### publish

- publish(event: string, data: unknown): void

- - Defined in pub-sub/PubSub.ts:11

  #### Parameters

  - ##### event: string

  - ##### data: unknown

  #### Returns void

### publishNamespaced

- publishNamespaced(namespace: string, event: Events, data: unknown): void

- - Defined in pub-sub/PubSub.ts:22

  Publish an event within a namespace

  #### Parameters

  - ##### namespace: string

    Any string to namespace the event

  - ##### event: Events

    Regular event type

  - ##### data: unknown

  #### Returns void

### subscribe

- subscribe(event: string, fn: (data: unknown) => void): void

- - Defined in pub-sub/PubSub.ts:32

  #### Parameters

  - ##### event: string

  - ##### fn: (data: unknown) => void

    - - (data: unknown): void

      - #### Parameters

        - ##### data: unknown

        #### Returns void

### subscribeNamespaced

- subscribeNamespaced(namespace: string, event: Events, fn: (data: unknown) => void): void

- - Defined in pub-sub/PubSub.ts:27

  #### Parameters

  - ##### namespace: string

  - ##### event: Events

  - ##### fn: (data: unknown) => void

    - - (data: unknown): void

      - #### Parameters

        - ##### data: unknown

        #### Returns void

### unsubscribeAll

- unsubscribeAll(): void

- - Defined in pub-sub/PubSub.ts:37

  #### Returns void

Generated using TypeDoc