Hello, guys).
Just discovered that Stream extends EventEmitter, and EventEmitter has once() method, which really helpful in some cases.
Can you add, please, once(event: "report", listener: (report: Report) => void): this; to IStream?)
Current workaround is:
return new Promise<IPullPriceFeedResponse>(async (resolve, reject) => {
(this.stream as unknown as EventEmitter).once('report', (report) => {
try {
const decoded = decodeReport(report.fullReport, report.feedID) as DecodedV3Report;
resolve(decoded);
} catch (error) {
reject(error);
}
})
})
Best regards.
Hello, guys).
Just discovered that Stream extends EventEmitter, and EventEmitter has once() method, which really helpful in some cases.
Can you add, please,
once(event: "report", listener: (report: Report) => void): this;to IStream?)Current workaround is:
Best regards.