Convert Callback to Promise in Publish Subscribe Model
Query asked by user Let say we have a service called A and it has the function subscribe(callback). The subscription from the service is an open connection that can receive data at any time, and the data can be accessed through the callback. Can we convert this callback to promise? if so, how? Sample A.subscribe((error, […]