We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7952152 commit b118e52Copy full SHA for b118e52
src/main/kotlin/g2601_2700/s2637_promise_time_limit/solution.ts
@@ -7,7 +7,7 @@ function timeLimit(fn: Fn, t: number): Fn {
7
const fns = fn(...args)
8
const timeLimitPromise = new Promise((_, reject) => {
9
setTimeout(() => {
10
- reject('Time Limit Exceeded')
+ reject(new Error('Time Limit Exceeded'))
11
}, t)
12
})
13
0 commit comments