Skip to content

Commit b118e52

Browse files
authored
Update solution.ts
1 parent 7952152 commit b118e52

File tree

1 file changed

+1
-1
lines changed
  • src/main/kotlin/g2601_2700/s2637_promise_time_limit

1 file changed

+1
-1
lines changed

src/main/kotlin/g2601_2700/s2637_promise_time_limit/solution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function timeLimit(fn: Fn, t: number): Fn {
77
const fns = fn(...args)
88
const timeLimitPromise = new Promise((_, reject) => {
99
setTimeout(() => {
10-
reject('Time Limit Exceeded')
10+
reject(new Error('Time Limit Exceeded'))
1111
}, t)
1212
})
1313

0 commit comments

Comments
 (0)