Skip to content

Commit 6b749b2

Browse files
rafaelcrMinigugus
andauthored
Add optional onlisten callback to listen() on TypeScript (porsager#360)
* Add optional `onlisten` callback on TypeScript * Update types/index.d.ts Co-authored-by: Minigugus <43109623+Minigugus@users.noreply.github.com> Co-authored-by: Minigugus <43109623+Minigugus@users.noreply.github.com>
1 parent 1e6d312 commit 6b749b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

types/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ declare namespace postgres {
608608
unsafe<T extends any[] = (Row & Iterable<Row>)[]>(query: string, parameters?: SerializableParameter[], queryOptions?: UnsafeQueryOptions): PendingQuery<AsRowList<T>>;
609609
end(options?: { timeout?: number }): Promise<void>;
610610

611-
listen(channel: string, cb: (value: string) => void): ListenRequest;
611+
listen(channel: string, onnotify: (value: string) => void, onlisten?: () => void): ListenRequest;
612612
notify(channel: string, payload: string): PendingRequest;
613613

614614
subscribe(event: string, cb: (row: Row | null, info: ReplicationEvent) => void): Promise<SubscriptionHandle>;

0 commit comments

Comments
 (0)