mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
SockJS can be instantiated with just a URL
see: https://github.com/sockjs/sockjs-client example copied from their README: ``` var sock = new SockJS('http://mydomain.com/my_prefix'); sock.onopen = function() { console.log('open'); }; sock.onmessage = function(e) { console.log('message', e.data); }; sock.onclose = function() { console.log('close'); }; sock.send('test'); sock.close(); ```
This commit is contained in:
Vendored
+1
-1
@@ -36,7 +36,7 @@ interface SockJS extends EventTarget {
|
||||
|
||||
declare var SockJS: {
|
||||
prototype: SockJS;
|
||||
new (url: string, _reserved: any, options?: {
|
||||
new (url: string, _reserved?: any, options?: {
|
||||
debug?: boolean;
|
||||
devel?: boolean;
|
||||
protocols_whitelist?: string[];
|
||||
|
||||
Reference in New Issue
Block a user