You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'a => unit
Discard the value of its argument and return [()]. For instance, [ignore(f x)] discards the result of
the side-effecting function [f]. It is equivalent to [f x; ()], except that the latter may generate a
compiler warning; writing [ignore(f x)] instead avoids the warning.
This use does not seem to be documented for ReScript or in the search results/syntax lookup. I added a setTimeout to my project and got a compiler error (This has type: Js.Global.timeoutId (defined as Js_global.timeoutId) Somewhere wanted: unit) that I cleared by piping to ignore.
Js.Global.setTimeout(() =>myFunc, 1000)->ignore
Thank you!
The text was updated successfully, but these errors were encountered:
Hello!
The VSCode plugin/OCaml library doc for
ignore
:This use does not seem to be documented for ReScript or in the search results/syntax lookup. I added a
setTimeout
to my project and got a compiler error (This has type: Js.Global.timeoutId (defined as Js_global.timeoutId) Somewhere wanted: unit
) that I cleared by piping toignore
.Thank you!
The text was updated successfully, but these errors were encountered: