airfone-client-js
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -14,3 +14,3 @@ export declare type StatusEvent = 'connect' | 'disconnect' | 'online' | 'offline' | 'error'; | ||
export declare type ConnectState = 0 | 1 | 2 | 3; | ||
declare class Payload { | ||
declare interface Payload { | ||
readonly from: any; | ||
@@ -32,5 +32,5 @@ readonly time: number; | ||
broadcast(payload: any): void; | ||
on(event: StatusEvent | MessageEvent | String, handle: (payload: Payload) => {}): AirfoneClient; | ||
on(event: StatusEvent | MessageEvent | String, handle?: (payload: Payload) => void): AirfoneClient; | ||
} | ||
export declare function getClient(options: ClientOptions): AirfoneClient; | ||
export {}; |
@@ -106,3 +106,3 @@ import { io } from 'socket.io-client'; | ||
} | ||
on(event, handle) { | ||
on(event, handle = (payload) => { }) { | ||
if (this.state != 0) { | ||
@@ -109,0 +109,0 @@ throw new Error('监听必须在调用connect方法之前添加'); |
{ | ||
"name": "airfone-client-js", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6683