Total Complexity | 1 |
Complexity/F | 0 |
Lines of Code | 12 |
Function Count | 0 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import './types' |
||
2 | |||
3 | export const native_ws = (() => {try {return WebSocket||null}catch { return null }})() |
||
4 | |||
5 | export const add_event = (o: wsc.Socket, e: string, handler: wsc.EventHandler) => { |
||
6 | return o.addEventListener(e, handler) |
||
7 | } |
||
8 | |||
9 | export const sett = ( |
||
10 | a: number, |
||
11 | b: { (): void; (...args: any[]): void; } |
||
12 | ) => setTimeout(b, a) |