Can anyone tell me why this code
handleCDC(response) {
console.log(JSON.stringify(response));
}
subscribe(channel, -1, handleCDC).then(response=>{
console.log('success', JSON.stringify(response.channel));
});
is illegal? why I can't call subscribe method directly?
channel
and where is it declared?