Do we plan to implement getting type hints for the code with type error?
Currently, there are no type hints if your code has type error in the editor. This breaks the DX of refactoring code, because the compiler will never produce type hints as long as the type of your...
View ArticleHow to make genType work nice with built-in/standard types?
v12 aims to remove TS Shims. However, since no official alternative currently exists, users will still have to rely on shims when necessary. Another alternative is adding genType output to core...
View ArticleIs this node error something I'm doing?
How would you make a lib support both ES6 and commonJS otherwise? I have introduced it from Bundle ReScript libraries with dual-package exports. Applied to rescript-collection. But since...
View Article[ANN] `@rescript/language-server` and `@rescript/tools` released
zed does not yet support external lsp configuration officially. According to the source code released yesterday, it seems implemented in the form of a wasm plugin....
View ArticleWhat keep you guys using Rescript?
ts variants? You mean the discriminated union hack they bolted on? Its ugly and it doesn’t support exhaustive pattern matching
View Article[ANN] `@rescript/language-server` and `@rescript/tools` released
It shouldn’t be difficult to add rescript support Here is an example to add Deno LSP: Add Deno LSP support by lino-levan · Pull Request #5816 · zed-industries/zed · GitHub
View ArticleCompilier success should be more affirming
warning: this might be my dumbest post yet if the compiler doesnt like what I did I get this >>>> Start compiling rescript: [1/3] src/Demo.ast FAILED: src/Demo.ast Syntax error!...
View ArticleCompilier success should be more affirming
I actually love this. A green success is always nice to see.
View ArticleWhat keep you guys using Rescript?
The native switch case statement is exhaustive? One of the first libraries I add in every TS project is ts-pattern (GitHub - gvergnaud/ts-pattern: 🎨 The exhaustive Pattern Matching library for...
View ArticleCompilier success should be more affirming
You can use rewatch today, if you want both a fast and monorepo-aware watcher and green emoji checkmarks when compilation succeeds. EDIT: But I agree the compiler output could be similarly appealing...
View ArticleWhat keep you guys using Rescript?
The original tsc does not support exhaustiveness check, but you can use this typescript-eslint rule, it works perfectly in my project. @typescript-eslint/switch-exhaustiveness-check
View ArticleWhat keep you guys using Rescript?
Tagged unions are not nearly as ergonomic as variants. I agree you can do exhaustive pattern matching, and the type checker will prevent errors, but the fact that those objects are structurally typed...
View Article[ANN] `@rescript/language-server` and `@rescript/tools` released
Oh right using LspAdapter seems much easier!
View ArticleIs this node error something I'm doing?
cometkim: A possible choice is to keep the @rescript/core package dedicated to ReScript and leave the build process to the end-users instead of providing prebuilt mjs files. What’s the downside?...
View ArticlePolymorphism in Rescript
That makes a lot of sense for small, local types and is how I’d do it in this case as well, but I think what they want here is being able to define “”“instances”“” outside of the type constructor, and...
View ArticleMidway clean during compilation makes compilation fail
I have a project that depends on three other packages I maintain. The problem that I’m facing is that while compiling on a clean environment (Dockerfile, for instance), the compiler states that the...
View Article[RFC] Automatic optional chaining
Something I would LOVE to see, even more than optional chaining, automatic or otherwise, would be optional chaining with pipes… let example = apple(_)?->orange?->grame("fruit")->basket
View ArticleRFC: private by default for values
Please tell me this is something that is actually coming! Private by default is a far wiser way of designing modules. It’s much like “secure by default”.
View Article