Changelog
11.0.0-beta.4
Changelog
11.0.0-beta.3
Changelog
11.0.0-beta.2
%ffi
extension (experimental - not for production use!) that provides a more robust mechanism for JavaScript function interoperation by considering function arity in type constraints. This enhancement improves safety when dealing with JavaScript functions by enforcing type constraints based on the arity of the function. https://github.com/rescript-lang/rescript-compiler/pull/6251%node
extension. https://github.com/rescript-lang/rescript-compiler/pull/6285Changelog
11.0.0-beta.1
"uncurried": false
is specified in the project config. https://github.com/rescript-lang/rescript-compiler/pull/6249Changelog
11.0.0-alpha.6
-bs-super-errors
flag has been deprecated along with Super_errors. https://github.com/rescript-lang/rescript-compiler/pull/6243@rescript/react
>= 0.12.0-alpha.2 is now required because of the React.fragment's children type fix. https://github.com/rescript-lang/rescript-compiler/pull/6238'children
-> React.element
) https://github.com/rescript-lang/rescript-compiler/pull/6238Js.Json.t
, Js.null
and Js.nullable
are now untagged variants representing their runtime values, instead of abstract types. https://github.com/rescript-lang/rescript-compiler/pull/6218Changelog
11.0.0-alpha.5
moduleResolution
option to customize extensions on emitted import statements. This helps to adjust output compatibility with TypeScript projects using ESM. https://github.com/rescript-lang/rescript-compiler/pull/6182
node
(default): Drop extensions.node16
: Use TS output's extensions. Make it ESM-compatible.bundler
: Use TS input's extensions. Make it ESM-compatible.assert
as a regular function. assert
is no longer a unary expression. Example: before assert 1 == 2
is parsed as (assert 1) == 2
, now it is parsed as assert(1 == 2)
. https://github.com/rescript-lang/rescript-compiler/pull/6180Changelog
11.0.0-alpha.4
foo(1, ...)
. This corresponds to curried application in the old mode. https://github.com/rescript-lang/rescript-compiler/pull/6166@inline
attibute on uncurried functions. https://github.com/rescript-lang/rescript-compiler/pull/6152@@directive
. https://github.com/rescript-lang/rescript-compiler/pull/6174Changelog
11.0.0-alpha.3
type t = {...t1, x:int, ...t2}
) https://github.com/rescript-lang/rescript-compiler/pull/5715Changelog
11.0.0-alpha.2
:>
for records. https://github.com/rescript-lang/rescript-compiler/pull/5721Changelog
11.0.0-alpha.1
.
. This can be turned on with @@uncurried
locally in a file. For project-level configuration in bsconfig.json
, there's a boolean config "uncurried"
, which propagates to dependencies, to turn on uncurried mode.
Since there's no syntax for partial application in this new mode, introduce @res.partial foo(x)
to express partial application. This is temporary and will later have some surface syntax.
Make uncurried functions a subtype of curried functions, and allow application for uncurried functions.
The make
function of components is generated as an uncurried function.
Use best effort to determine the config when formatting a file.
https://github.com/rescript-lang/rescript-compiler/pull/5968 https://github.com/rescript-lang/rescript-compiler/pull/6080 https://github.com/rescript-lang/rescript-compiler/pull/6086 https://github.com/rescript-lang/rescript-compiler/pull/6087@genType
annotation at the module level, meaning that all the items in the module should be exported. https://github.com/rescript-lang/rescript-compiler/pull/6113@genType
annotations on module definitions. https://github.com/rescript-lang/rescript-compiler/pull/6113npm i -g rescript@9
rescript convert <reason files>
(. x) => y => 3
is not equivalent to (. x, y) => 3
anymore. It's instead equivalent to (. x) => { y => 3 }
.
Also, (. int) => string => bool
is not equivalen to (. int, string) => bool
anymore.
These are only breaking changes for unformatted code.**
is now right-associative. 2. ** 3. ** 2.
now compile to Math.pow(2, Math.pow(3, 2))
and not anymore Math.pow(Math.pow(2, 3), 2)
. Parentheses can be used to change precedence.j`$(a)$(b)`
interpolation deprecated in compiler version 10 https://github.com/rescript-lang/rescript-compiler/pull/6068Printexc
@deriving(jsConverter)
not supported anymore for variant types https://github.com/rescript-lang/rescript-compiler/pull/6088@genType.as
for records and variants which has become unnecessary. Use the language's @as
instead to channge the runtime representation without requiring any runtime conversion during FFI. https://github.com/rescript-lang/rescript-compiler/pull/6099 https://github.com/rescript-lang/rescript-compiler/pull/6101async
and uncurried application https://github.com/rescript-lang/rescript-compiler/pull/5856{v => ...}
is enclosed in braces https://github.com/rescript-lang/rescript-compiler/pull/5949foo(x,_)
in uncurried mode would generate a curried function https://github.com/rescript-lang/rescript-compiler/pull/6082@this
decorator in ReScript functions. This fix allows proper handling of async functions with the @this
decorator. Issue: https://github.com/rescript-lang/rescript-compiler/issues/6100make
function and treat it like a curried one #5802 #5808 #5812.res
syntax (Pexp_object
) https://github.com/rescript-lang/rescript-compiler/pull/5841##
, which does not exist in .res
syntax https://github.com/rescript-lang/rescript-compiler/pull/5844@meth
annotation as making the type uncurried for backwards compatibitly with some examples https://github.com/rescript-lang/rescript-compiler/pull/5845@set
annotation for field update as generating an uncurried function https://github.com/rescript-lang/rescript-compiler/pull/5846function$<fun_type, arity>
this avoids having to declare all the possible arities ahead of time https://github.com/rescript-lang/rescript-compiler/pull/5870make
function and treat it like a curried one https://github.com/rescript-lang/rescript-compiler/pull/6081|>
in uncurried mode by desugaring it https://github.com/rescript-lang/rescript-compiler/pull/6083