rescript-compiler
rescript-compiler copied to clipboard
The compiler for ReScript.
with v11.0.0-rc.8 ```res type \"A" = {foo: int} let fn = ({foo}) => { foo } ``` ``` File "jscomp/ml/env.ml", line 909, characters 26-32: Assertion failed ``` [playground link](https://rescript-lang.org/try?version=v11.0.0-rc.8&code=C4TwDgpgBAOgRAQTlAvFA3gMwPbYFxQCWAdsAL4BQFANhMFJsalABRa5kCUqAfBhVAa4KlIA)
I find the `Nullable` module name very confusing because usually, it's `'a | null,` not `'a | undefined | null` It's not super critical to me, but I think for...
There are currently the following issues with dependency arrays for React hooks, for example `useEffect` which is defined as follows: ``` @module("react") external useEffect: (@uncurry (unit => option unit>), 'deps)...
Propose the Bigint in JS as a built-in type. mdn: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/BigInt ### Background `BigInt` is a new primitive that provides a way to represent whole numbers larger than 2^53, which...
Thank you for filing! Check list: - [x] Concise, focused, friendly issue title & description. - [x] Is it a bug? Usage questions should often be asked in the [forum](https://forum.rescript-lang.org)...
## Explore a cleaner way to represent ReScript modules in TypeScript using namespaces ### Background In ReScript, modules are used to organize code and encapsulate related types and values. ReScript...
The bs-g flag [has been an experiment](https://rescript-lang.org/docs/reason-compiler/latest/extended-compiler-options#-bs-g-experimental-since-310) for better data structure debugging before ReScript compiled to idiomatic JS data structures. Since this feature actually caused a bug (#6495) with the...
Example before reformatting ([Playground link](https://rescript-lang.org/try?version=v11.0.0-rc.6&code=C4TwDgpgBMULxQN4CgpQGYHtMC4oGdgAnASwDsBzAGlSgCMBDIvQ0ymgX2WQBsJYGeWAhRosuKACJgEQpJppGzKTLmdufWHXhJaAej1QACgCUA8gCEAMgFEAsngAqACxL4oAY0wBbbxDKw3pgAbrJQDOgyRDDO0JIAdImSUADusWRQRBBYRN4MwDIAJvG0ifEMCvRMeJLi8shcQA)): ```rescript type t = { foo: string, bar: string, } let a: t = { foo: "test", bar: "test", } let b = { //...
I observed some weird behavior while working on my app, so I tried to reduce the problem to a minimal example. ```rescript type a = { title: string, ingredients: array,...
Hi, I've tried to cover some code with tests with rescript-vitest and found an interesting bug: Here is my test file: ```res open Vitest testAsync("async test", async _ => {...