Documentation generator to website
Great work @lil5 ! This is definitely an area that needs attention. We recently did some work (that hasn’t been properly packaged for end use yet) for: Formatting all example code in docstrings...
View ArticleDocumentation generator to website
@zth The json gives me the doc strings: https://rescript-reasonably-typed.netlify.app/reference/array-async/arrayasync/ But before adding it to the json it adds page breaks if the text is too long, I...
View ArticleDocumentation generator to website
We don’t currently support that syntax, but I really think we should, given it’s so common in the JS ecosystem. Reading up on the semantics, it seems the behavior should just be to drop one leading *...
View ArticleExperiment: Allow inline records in externals to simplify writing bindings
In v12 we’ve added support for inline/nested records - being able to define records nested in records, without having to define a type for each record separately. It looks like this: type person = {...
View ArticleExperiment: Allow inline records in externals to simplify writing bindings
I often define long and one-off records for the optional parameters/options argument of a js function, so this can be very useful to simplify bindings! Out of curiosity, why can’t this be used in...
View ArticleExperiment: Allow inline records in externals to simplify writing bindings
It could be extended to allow that, just wasn’t included in the initial PoC. But it shouldn’t be hard to include if it adds value.
View ArticleRFC: private by default for values
are we ever going to see this? it makes so much more sense than .resi-files to me, because using .resi-files is “public by default” (until you add the .resi-file and start writing it). i truly, truly...
View ArticleRFC: Variant maps
Jane street has a similar thing, first class field values via a PPX. A map that allows enum variants as keys and compiles to JSON still seems like a natural way to handle this. I’ll see if it would be...
View ArticleRFC: Variant maps
This also came up as a related example: GitHub - janestreet/ppx_typed_fields: GADT-based field accessors and utilities EDIT: No docs, but what it does is mentioned in this blog post: Jane Street Blog...
View ArticleProposing new syntax for zero-cost unwrapping options/results
Happy to say this was just merged under the new concept of “experimental features” (that you will be able to turn on/off in rescript.json) and will be in the next beta that’ll be released this week
View ArticleExperimentation with simplifying pipe autocompletion
I don’t use x do you post on bluesky or mastodon or somewhere where you don’t need an account to view post threads?
View ArticleExperimentation with simplifying pipe autocompletion
Yeah we should probably setup something that mirrors all Tweets to BlueSky. Manually copying them over is tedious. I think thanks to ATProto you can also date them back to the date of the original...
View ArticleHttps://rescript-lang.org/packages is not in website navbar
It’s really hard to find the community packages page, it would be helpful to have it available from a link in the navbar. I haven’t found this listing until I happened to click the right link in...
View ArticleHttps://rescript-lang.org/packages is not in website navbar
Do you think it’s useful? I just google stuff instead. We actually wanted to sunset it. It was mainly a sacrifice because of a little redesign though. @joshderochervlk any ideas?
View ArticleHttps://rescript-lang.org/packages is not in website navbar
NPM’s search is not great, you look up rescript <package name> you just find the core libs, or the package name in question. The search results get better with keywords:rescript ... but you’d...
View ArticleHttps://rescript-lang.org/packages is not in website navbar
I removed it because the way it was fetching data wasn’t great and was locked to the time of builds. It lacked good filters, sorting, and it wasn’t clear how to get something listed. I have plans to...
View ArticleHttps://rescript-lang.org/packages is not in website navbar
Brought it back. Thanks for the feedback!
View ArticleReplicating an existential type from OCaml in Rescript
I am trying to use an existential type in a case where I have to pass a function that returns a React component to an external TS library – in this case, I don’t care what the react component is, just...
View ArticleReplicating an existential type from OCaml in Rescript
Hello, I think you’ve just been using a wrong syntax, what you’re looking for is this IMO: type rec anyComponent = AnyComponent(React.componentLike<'a, 'b>): anyComponent
View ArticleReplicating an existential type from OCaml in Rescript
Yep, that was the issue. Thanks!
View Article