in cometd_setup the call is var url = getCometdURL(data.conn, data.args); whereas the signature has only one parameter as below: function getCometdURL(conn:any) { return conn.instanceUrl + '/cometd/44.0'; }