Preview:
emit(event: string, payload?: any, callback?: Function): void {
    this.socket.emit(event, payload, callback);
}

listen(event: string): Observable<any> {
    return this.socket.fromEvent(event);
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter