diff options
| author | Asko Nõmm <asko@nmm.ee> | 2025-04-29 00:07:12 +0300 |
|---|---|---|
| committer | Asko Nõmm <asko@nmm.ee> | 2025-04-29 00:07:12 +0300 |
| commit | aca05ef5b9f3f911d62a2aa37e3916695d2b78aa (patch) | |
| tree | 3402a3712481e957462264f8702fe62836719e66 /src/shapex.ts | |
| parent | 4cdeb61f46bed511850f7fc7646bdca27f72132e (diff) | |
Allow returning void in a event callback
Diffstat (limited to 'src/shapex.ts')
| -rw-r--r-- | src/shapex.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shapex.ts b/src/shapex.ts index 4fde18b..8ef6ebd 100644 --- a/src/shapex.ts +++ b/src/shapex.ts @@ -35,7 +35,7 @@ export type EventCallback< T, W extends unknown = undefined, D extends unknown = W -> = (state: T, data?: W) => SubscriptionResponse<T, W, D>; +> = (state: T, data?: W) => SubscriptionResponse<T, W, D> | void; type Subscription<T, W extends unknown = undefined, D extends unknown = W> = { listener: string; |
