rescript-compiler icon indicating copy to clipboard operation
rescript-compiler copied to clipboard

The compiler for ReScript.

Results 500 rescript-compiler issues
Sort by recently updated
recently updated
newest added

Labeled optional arguments are handled differently in general functions and functions annotated with `@react.component`. [Playground](https://rescript-lang.org/try?version=v11.0.1&code=DYUwLgBAZgdhC8EAUA-AHgLggewA5gEtsYAeAZzACcCYBzAPngGVsBbEJAIim204Ep+CegCgIEMgHcCYAMYALCGggBvMRAA+EFuyRoh8ekoC09AEogAhrLAA6CtTrqtAOWIhhEC9bswArsDA6gC+IiKwqGjMbBycAEaWlAL8pgDCxGTYoLbA2LThMJHwbjAgKfTpMJnZufkR5ZXVIDl5YazYACYBHmapAIwIquoAApRWNraybLjuMGDqoJCslgDWHoiRWHiExORUNAwGouLiUjIKSkMnmtoxekcm5uN2Dgfq4q7unt4T-oHvEFCoRE7S6oC8qQATIM1OJRs9JtNZvNxIsIMs1oNNjh8ERSK86IxuLxOBAAPQAKggMgk8mwAQ6EDiHh0sR4fCEFLJRwBaFMPxe+ycwJIvQGURUrK4CSS-GC5PoaQyWWatREov6SngKhKIHlZMVFWVNVa6t60Ki8USpINSqqKpa+Q1Fu1uv1hsaDrVQA) ```rescript let fn = (~x: option=Some("foo")) => switch x { | Some(x) => x->React.string |...

Follow-up to #6952 where @glennsl wrote: > ... In OCaml, an empty variant type would be `type a = |`. That doesn't seem to be supported in Rescript though. Do...

syntax

```res let v = 1e ``` emits ```js var v = 1e; export { v , } ``` which is invalid in JS.

bug
syntax

#6663 fixed an issue where `@module("..") external ..` would also emit a static import. But it looks like `external` + dynamic import isn't very well supported if the `external` is...

```res // ABC.resi type a = X | Y0 ``` ```res // ABC.res type a = X | Y ``` The compiler failed to compile and show the message as...

bug

## Background Imagine a class statement written from external JS. ```js // rescript_error.mjs export class RescriptError extends Error { constructor(exnId, payload) { super(); } } // and in rescript_error.cjs module.exports...

enhancement

Resolves #5779 This PR contains many breaking changes Completely dropped - [x] BukleScript compile time contexts - OCaml utils - [ ] parser - [ ] lexer - [ ]...