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

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:

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.

Thanks for reporting, will look into this.

@dsiu deprecating this was too soon, and a mistake by me. Fixed here: Undeprecate Js_OO since it is still used by zth · Pull Request #7955 · rescript-lang/rescript · GitHub

Will be in the next RC, sorry for the inconvenience!

1 Like

@zth : Thanks for the quick fix.