Comparing version 3.0.0-alpha.10 to 3.0.0-alpha.11
@@ -15,2 +15,3 @@ export declare enum ReadyState { | ||
onError?: (event: WebSocketEventMap['error']) => void; | ||
protocols?: string | string[]; | ||
} | ||
@@ -17,0 +18,0 @@ export interface Result { |
@@ -55,3 +55,4 @@ var __read = this && this.__read || function (o, n) { | ||
onMessage = options.onMessage, | ||
onError = options.onError; | ||
onError = options.onError, | ||
protocols = options.protocols; | ||
var onOpenRef = useLatest(onOpen); | ||
@@ -99,3 +100,3 @@ var onCloseRef = useLatest(onClose); | ||
websocketRef.current = new WebSocket(socketUrl); | ||
websocketRef.current = new WebSocket(socketUrl, protocols); | ||
setReadyState(ReadyState.Connecting); | ||
@@ -102,0 +103,0 @@ |
@@ -15,2 +15,3 @@ export declare enum ReadyState { | ||
onError?: (event: WebSocketEventMap['error']) => void; | ||
protocols?: string | string[]; | ||
} | ||
@@ -17,0 +18,0 @@ export interface Result { |
@@ -72,3 +72,4 @@ "use strict"; | ||
onMessage = options.onMessage, | ||
onError = options.onError; | ||
onError = options.onError, | ||
protocols = options.protocols; | ||
var onOpenRef = useLatest_1["default"](onOpen); | ||
@@ -116,3 +117,3 @@ var onCloseRef = useLatest_1["default"](onClose); | ||
websocketRef.current = new WebSocket(socketUrl); | ||
websocketRef.current = new WebSocket(socketUrl, protocols); | ||
setReadyState(ReadyState.Connecting); | ||
@@ -119,0 +120,0 @@ |
{ | ||
"name": "ahooks", | ||
"version": "3.0.0-alpha.10", | ||
"version": "3.0.0-alpha.11", | ||
"description": "react hooks library", | ||
@@ -62,3 +62,3 @@ "keywords": [ | ||
"license": "MIT", | ||
"gitHead": "1b67bdb4bce0805df77420a69ed05d240d17e061" | ||
"gitHead": "ea9155aa93535b17b254a8524ada1348c15d710b" | ||
} |
Sorry, the diff of this file is too big to display
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
608040
15246