Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(client?: Rest) {
client = client || new Rest();
this.subscribers = new Map();
this.listener = new CometD();
this.listener.configure({
url: `${client.config.instanceUrl}/cometd/${client.config.version.toFixed(1)}/`,
requestHeaders: { Authorization: `OAuth ${client.config.accessToken}` },
appendMessageTypeToURL: false
});
}