Private by default
How would people feel if everything was private by default in ReScript instead of the opposite? Using a signature file to hide details feels cumbersome, especially since I often use this for React...
View ArticlePrivate by default
I met someone today who was complaining that Rust requires pub to be added everywhere
View ArticlePrivate by default
I suppose you read: RFC: private by default for values ? I think we are a bit hesitant to do such a big change after the massive “uncurried by default” change. Other than that there are benefits in...
View ArticleRFC: Nested record definitions
Just want to be clear here that this version is “only” syntax sugar - actual record definitions are emitted for each nested record. Although syntax certainly would let us make it nested structures for...
View ArticleHow to use probs with preact
Hey, how can i create Probs for Preact in Rescript, i am new to using JSX together with Rescript. I mean for example onlick or onmousedown. Or other custom probs. Is there an way i could use events?
View ArticleHow to use probs with preact
Can you show some js code you’re trying to convert? Are you talking about probs or props?
View ArticlePrivate by default
I’d be happy with a private keyword instead of having to make a .resi file. I have gotten used to the .resi files, but it’s not super intuitive to JS programmers. private let x = 42`
View ArticlePrivate by default
There is a syntax for private let bindings, but it allows multiple values like a module would. That way you don’t need to put private before every value. %%private( let x = 42 let y = 1 )
View ArticlePrivate by default
Perhaps I’m more looking for a Vite plugin that simply removes any exports. It shouldn’t be too difficult to remove sum from export { sum, CounterMessage, App, } This avoids the need for any changes...
View ArticlePrivate by default
Like this: GitHub - egoist/vite-plugin-remove-exports: A Vite plugin to remove certain exports ?
View Article[ANN] rescript-rest - RPC-like client, contract, and server implementation...
And SWC support now is here as well:
View ArticlePrivate by default
While I would prefer a “private by default” setting I mostly don’t care. Sometimes I try to use the %%private approach, but my LSP doesn’t work for code inside. So I use a nested module to “hide” the...
View ArticlePrivate by default
Sounds like something that should be fixed in the LSP indeed. Would you log an issue on the tracker?
View ArticlePrivate by default
Yeah, you are right this was never solved: No hover type hints within %%private(...) · Issue #563 · rescript-lang/rescript-vscode · GitHub Cannot apply renaming inside `%%private` blocks. · Issue #599...
View ArticlePrivate by default
Oh, right, forgot about those. I think the assessment @cristianoc has still holds - we should find a better representation for this instead. And yeah, I think we’re better off than ever to do that now...
View ArticleReScript on the developer voices podcast
ReScript: A Better Typed JavaScript? (with Gabriel Nordeborn) Watch @zth talk about ReScript in the latest Developer Voices podcast episode.
View ArticleSpread incoming type in module function
This might be stretching it but can I do something like this module BaseCollection = ( T: { type data }, ) => { type t type extendedData = { created: string, updated: string, // Error on this line...
View ArticleSpread incoming type in module function
As far as I know, you can’t define something as “any” record. I asked a similar question some time ago, but can’t find the thread anymore.
View ArticleSpread incoming type in module function
well you actually need to know more about this type than just being a record, it also needs not to have any fields created and updated that are not string. So it’s actually not that easy to model...
View Article[ANN] rescript-rest - RPC-like client, contract, and server implementation...
Now, you can handle webhooks in Next.js handlers. GitHub GitHub - DZakh/rescript-rest: 😴 ReScript RPC-like client, contract, and... 😴 ReScript RPC-like client, contract, and server implementation for...
View Article