Skip to content

Commit

Permalink
refactor: Change on API
Browse files Browse the repository at this point in the history
  • Loading branch information
hxg2050 committed Apr 7, 2024
1 parent 287b376 commit 3114944
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@feiyun/client",
"repository": "https://github.com/hxg2050/feiyun.git",
"version": "0.0.7",
"version": "0.0.8",
"private": false,
"type": "module",
"main": "./src/index.ts",
Expand Down
4 changes: 3 additions & 1 deletion packages/client/src/FeiyunClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ export class FeiyunClient {
* @param name
* @param callback
*/
on(name: string | symbol | EventCallback, callback: EventCallback | any, target: any) {
on(name: string | symbol, callback: EventCallback, target?: any): void
on(callback: EventCallback, target?: any): void
on(name: string | symbol | EventCallback, callback?: EventCallback | any, target?: any) {
if (typeof name === 'function') {
// 监听所有服务器通知消息
this.on(this.anyKey, name, callback)
Expand Down
2 changes: 1 addition & 1 deletion packages/feiyun/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "feiyun",
"repository": "https://github.com/hxg2050/feiyun.git",
"version": "0.2.13",
"version": "0.2.14",
"private": false,
"type": "module",
"main": "./src/index.ts",
Expand Down

0 comments on commit 3114944

Please sign in to comment.