Skip to content

Commit fcca4a4

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ declare namespace postgres {
617617
listen(channel: string, onnotify: (value: string) => void, onlisten?: () => void): ListenRequest;
618618
notify(channel: string, payload: string): PendingRequest;
619619

620-
subscribe(event: string, cb: (row: Row | null, info: ReplicationEvent) => void): Promise<SubscriptionHandle>;
620+
subscribe(event: string, cb: (row: Row | null, info: ReplicationEvent) => void, onsubscribe?: () => void): Promise<SubscriptionHandle>;
621621

622622
largeObject(oid?: number, /** @default 0x00020000 | 0x00040000 */ mode?: number): Promise<LargeObject>;
623623

0 commit comments

Comments
 (0)