Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const asyncDoSomethingWithResult = (result: number, callback: GenericAsyncCallback<Error, string>) => {
- setTimeout(() => {
- if (result % 2 === 0) callback(new Error(`Result Infraction`));
- else callback(null, "It's all going to be ok.")
- }, 1000);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement