Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

ReScript-v12.0.0-rc.1: deprecated: Js_OO.Callback.arity2

$
0
0

Now that rescript-v12.0.0-rc.1 defaults warning to error, I am getting the deprecation warning with the example from the official documentation

How do you model a callback with @this and arity >= 2?

From the doc:

let fun() = 
type x
@set external setOnload: (x, @this ((x, int) => unit)) => unit = "onload"

Output:

[W] Line 2, column 35:
deprecated: Js_OO.Callback.arity2
  This has been deprecated and will be removed in v13.

playground

FYI, I am porting rescript-mocha to ReScript-v12. It uses many functions that require a callback with @this with various arities.


Viewing all articles
Browse latest Browse all 2592

Trending Articles