Changelog
10.0.0
Compiler
bsconfig.json
does not support // line
comments anymore.
"suffix": ".bs.js" // determine the suffix
Js.String.match_
as it was wrong. #5070
Js.String.match_
and Js.String2.match_
type opt = {x: int, y?: string}
were added as an experimental feature #5423 #5452 New Syntax@new @variadic
(see https://github.com/rescript-lang/rescript-compiler/pull/5364)rescript build
on Windows #5516rescript init
command not working #5526Changed Linux build to depend on GLIBC 2.28 again for compatibility with Debian 10.
Proper M1 support (CI now supports M1 native builds)
Syntax
@bs.send.pipe
is now removed. Earlier it was deprecated.let f = (x, ~z) => x + z; f(1, 2)
let f = (x, ~z) => x + z; f(1, ~z=2)
instead@val
annotations do not work anymore, and externals with = ""
give an error.
external setTimeout: (unit => unit, int) => float = "setTimeout"
is not supported anymore.@val external setTimeout: (unit => unit, int) => float = "setTimeout"
instead.@val external setTimeout: (unit => unit, int) => float = ""
is not supported anymore.@val external setTimeout: (unit => unit, int) => float = "setTimeout"
instead.let blockCommentsRe = %re("/\\/\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*+\\//g")
.let blockCommentsRe = %re("/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\//g")
instead.export type t = int
@genType type t = int
import realValue: complexNumber => float from "./MyMath"
@genType.import("./MyMath") external realValue: complexNumber => float = "realValue"
let str = "Σ"
. And, you'll be able to pattern match on unicode chars: switch c { | 'Σ' => "what a fine unicode char" | _ => "unicode is fun" }
/** ... */
are now supported. Inernally, they are attributes, so are only valid at positions where @foo
is allowed, or a syntax error is given. Similarly for module-level /*** comments */
that can go where @@attributes
go.Libraries
rescript-relay
0.23.0 is not supported.rescript-relay@beta
or the new version when released.bytes_to_string
https://github.com/rescript-lang/rescript-compiler/issues/5573 https://github.com/rescript-lang/rescript-compiler/pull/5589Playground
jsoo_playground_main.ml
as the rescript-lang.org playground bundle entrypoint