Skip to content

Commit

Permalink
Merge pull request #55 from xpodev/dev/0.9.0
Browse files Browse the repository at this point in the history
Dev/0.9.0
  • Loading branch information
neriyaco authored Aug 18, 2024
2 parents fbda6fb + 35b294d commit dc4c3d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- main
- dev/v\d+\.\d+\.\d+
types: [opened, reopened, synchronize]
paths:
- 'seamless/**/*.py'

permissions:
contents: read
Expand Down
7 changes: 1 addition & 6 deletions node/packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,16 @@ class Seamless {
}

registerEventListener(
seamlessId: string,
event: string,
callback: (e: any) => any
) {
this.socket.on(`${seamlessId}:${event}`, callback);
this.socket.on(event, callback);
}

emit(event: string, ...args: any[]) {
this.socket.emit(event, ...args);
}

sendCustomEvent(event: string, data: any) {
this.socket.emit("custom", event, data);
}

sendWaitResponse<T>(event: string, ...args: any[]) {
return new Promise<T>((resolve) => {
this.socket.emit(event, ...args, resolve);
Expand Down

0 comments on commit dc4c3d2

Please sign in to comment.