You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
329 B
11 lines
329 B
|
|
function getGlobal(): any { |
|
if (typeof self !== 'undefined') { return self; } |
|
if (typeof window !== 'undefined') { return window; } |
|
if (typeof global !== 'undefined') { return global; } |
|
throw new Error('unable to locate global object'); |
|
}; |
|
|
|
const _WebSocket = getGlobal().WebSocket; |
|
|
|
export { _WebSocket as WebSocket };
|
|
|