Changelog
10.1.0-alpha.2
"jsx"
configuration to dependencies https://github.com/rescript-lang/rescript-compiler/pull/5661{}
for records where all fields are optional https://github.com/rescript-lang/rescript-compiler/pull/5658type empty = {}
) https://github.com/rescript-lang/rescript-compiler/pull/5658->
and |>
https://github.com/rescript-lang/syntax/pull/629Changelog
10.1.0-alpha.1
->
does not support a code block on the right-hand side e.g. x->{ open A; get("test") }
async
/await
https://github.com/rescript-lang/rescript-compiler/pull/5537promise
a built-in type https://github.com/rescript-lang/rescript-compiler/pull/5650Set
, Map
, WeakSet
, and WeakMap
https://github.com/rescript-lang/rescript-compiler/pull/5630->
processing eats up attributes https://github.com/rescript-lang/rescript-compiler/pull/5581rescript build
would leave the .bsb.lock
file behind and block future buildsChangelog
10.0.1
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 entrypointChangelog
9.1.4
rescript dump path/to/file.cmi
Will dump the interface to a readable output, note this is integrated into the build system that the build will try to build it if it is not already there
clean -with-deps
, -with-deps
is not needed any moreUsage: bsc <options> <files>
Options are:
Options:
-w <list> Enable or disable warnings according to <list>:
+<spec> enable warnings in <spec>
-<spec> disable warnings in <spec>
@<spec> enable warnings in <spec> and treat them as errors
<spec> can be:
<num> a single warning number
<num1>..<num2> a range of consecutive warning numbers
default setting is +a-4-9-20-40-41-42-50-61-102
-bs-g Debug mode
-bs-D Define conditional variable e.g, -D DEBUG=true
-e (experimental) set the string to be evaluated in ReScript syntax
-v Print compiler version and location of standard library and exit
-version Print version and exit
-warn-help Show description of warning numbers
-warn-error <list> Enable or disable error status for warnings according
to <list>. See option -w for the syntax of <list>.
Default setting is -a+5+6+101+109
None