mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 21:10:23 +00:00
change to arrow functions
This commit is contained in:
@@ -2,13 +2,13 @@ import { hubConnection } from 'signalr-no-jquery';
|
||||
|
||||
const connection = hubConnection('http://[address]:[port]');
|
||||
const hubProxy = connection.createHubProxy('hubNameString');
|
||||
|
||||
|
||||
// set up event listeners i.e. for incoming "message" event
|
||||
hubProxy.on('message', function(message) {
|
||||
hubProxy.on('message', (message) => {
|
||||
console.log(message);
|
||||
});
|
||||
|
||||
// connect
|
||||
connection.start({ jsonp: true })
|
||||
.done(function(){ console.log('Now connected, connection ID=' + connection.id); })
|
||||
.fail(function(){ console.log('Could not connect'); });
|
||||
.done(()=>{ console.log('Now connected, connection ID=' + connection.id); })
|
||||
.fail(()=>{ console.log('Could not connect'); });
|
||||
|
||||
Reference in New Issue
Block a user