Skip to content

Commit cf720bf

Browse files
committed
Try EventEmitter type declaration for Zongji class
1 parent 5edc8a0 commit cf720bf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

types/index.d.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Socket } from 'net';
2+
import { EventEmitter } from 'events';
23

34
/**
45
* The types described here were added on an adhoc basis based on requirements in the Powersync Service.
@@ -177,7 +178,7 @@ export interface MySQLConnection {
177178
query(sql: string, callback: (error: any, results: any, fields: any) => void): void;
178179
}
179180

180-
export declare class ZongJi {
181+
export declare class ZongJi extends EventEmitter {
181182
stopped: boolean;
182183
connection: MySQLConnection;
183184
constructor(options: ZongjiOptions);
@@ -186,6 +187,4 @@ export declare class ZongJi {
186187
stop(): void;
187188
pause(): void;
188189
resume(): void;
189-
190-
on(type: 'binlog' | string, callback: (event: BinLogEvent) => void): void;
191190
}

0 commit comments

Comments
 (0)