const causeUnhandledRejectionAfter =
(timeout: number): Promise<void> =>
new Promise((resolve, reject): number =>
setTimeout(reject, timeout));
causeUnhandledRejectionAfter(3000);
Last active
April 4, 2020 17:15
-
-
Save hagevvashi/e8d3c76b891ec5e16cd9e29f002d04e3 to your computer and use it in GitHub Desktop.
Promise.rejectionを発生させる例
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment