Skip to content

Commit 1e17056

Browse files
committed
Remove @bs.send.pipe.
Following from 8800a5e
1 parent eacc273 commit 1e17056

File tree

10 files changed

+283
-8265
lines changed

10 files changed

+283
-8265
lines changed

jscomp/others/js_array.res

Lines changed: 148 additions & 116 deletions
Large diffs are not rendered by default.

jscomp/others/js_promise.res

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,13 @@ external all6: (
8383

8484
@val @scope("Promise") external race: array<promise<'a>> => promise<'a> = "race"
8585

86-
@bs.send.pipe(: promise<'a>) external then_: (@uncurry ('a => promise<'b>)) => promise<'b> = "then"
86+
@send external then_: (promise<'a>, @uncurry ('a => promise<'b>)) => promise<'b> = "then"
87+
let then_ = (arg1, obj) => then_(obj, arg1)
8788

88-
@bs.send.pipe(: promise<'a>)
89-
external catch: (@uncurry (error => promise<'a>)) => promise<'a> = "catch"
89+
90+
@send
91+
external catch: (promise<'a>, @uncurry (error => promise<'a>)) => promise<'a> = "catch"
92+
let catch = (arg1, obj) => catch(obj, arg1)
9093
/* ` p|> catch handler`
9194
Note in JS the returned promise type is actually runtime dependent,
9295
if promise is rejected, it will pick the `handler` otherwise the original promise,

0 commit comments

Comments
 (0)