base-websocket
Advanced tools
Comparing version 1.0.5 to 1.0.6
{ | ||
"name": "base-websocket", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "webSocket basic module", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
interface Data<obj> { | ||
[propName: string]: obj; | ||
} | ||
interface Init { | ||
url: string; | ||
onOpen: () => void; | ||
onResponse: (res: any) => void; | ||
onError: () => void; | ||
onClose: () => void; | ||
} | ||
type Send = <obj>(data: Data<obj>) => void; | ||
declare let send: Send; | ||
declare let closeWS: () => void; | ||
declare function initWebSocket({ | ||
url, | ||
onOpen, | ||
onResponse, | ||
onError, | ||
onClose | ||
}: { | ||
url: string; | ||
onOpen?: () => void; | ||
onResponse?: () => void; | ||
onError?: () => void; | ||
onClose?: () => void; | ||
}): void; | ||
declare function initWebSocket({ url, onOpen, onResponse, onError, onClose }: Init): void; | ||
export { initWebSocket, send, closeWS }; |
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
1644
4
42