chrome.runtime.onMessage.addListener(
function(props) {
switch(props.request_type) {
case 'msg':
websocketClass.msgSubmit(props.data)
break;
case 'url':
websocketClass.msgSubmit(props.data)
break;
case 'his':
sendResponse({his: websocketClass.messages});
}
}
);
I am encountering a problem where, despite having @types/chrome added, sendResponse is still throwing the error mentioned above. Can anyone suggest a solution to make this function properly?