Remove unused asyncs
This commit is contained in:
parent
7b8d9193e2
commit
e32c453bc3
@ -1,10 +1,10 @@
|
||||
import { DoneCallback } from '../../src/types';
|
||||
|
||||
export const reportCallbackErrors = (done: DoneCallback) => {
|
||||
return (fAsync: (...args: any[]) => void|Promise<void>) => {
|
||||
return (f: (...args: any[]) => void) => {
|
||||
const wrapped = async (...args: any[]) => {
|
||||
try {
|
||||
await fAsync(...args);
|
||||
f(...args);
|
||||
} catch (err) {
|
||||
done(err);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user