8000 Update ReScript documentation for S.nullish to use correct type by mediremi · Pull Request #119 · DZakh/sury · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update ReScript documentation for S.nullish to use correct type #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 10, 2025

Conversation

mediremi
Copy link
Contributor
@mediremi mediremi commented May 7, 2025

Managed to port my codebase from v9.3.0 to v10.0.0-rc.5. Was relatively smooth since the release notes for various RCs are very detailed & helpful 😃

Only major hiccup I had was that I assumed S.nullable was simply renamed to S.nullish, but turns out the type changed too. Hopefully this PR should prevent anyone else migrating from making the same mistake I did 🤞

@DZakh
Copy link
Owner
DZakh commented May 8, 2025

I had a discussion with @cknitt about keeping the old behaviour (at least for PPX). Curious what you think of it. Should the schema return Js.Nullable.t or option?

@mediremi
Copy link
Contributor Author
mediremi commented May 8, 2025

I've been using nullable with S.Option.getOr (e.g. S.nullable(S.string)->S.Option.getOr("")), so keeping it as option would be preferrable for me.

Or there could be a S.Nullable.getOr?

@DZakh
Copy link
Owner
DZakh commented May 8, 2025

I think I want to make another breaking change 😅

What do you think of:

  • Rename S.nullish to S.nullable (for ReScript API)
  • Add S.nullableAsOption

@mediremi
Copy link
Contributor Author
mediremi commented May 8, 2025

Those changes make sense to me 👍

Copy link
Owner
@DZakh DZakh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I'll merge it for now and prepare the rc with changes we discussed when I 'm back home

@DZakh DZakh merged commit 9a43121 into DZakh:main May 10, 2025
5 checks passed
@DZakh
Copy link
Owner
DZakh commented May 13, 2025

@mediremi Added S.nullableAsOption as a part of https://github.com/DZakh/sury/releases/tag/v10.0.0-rc.6

@mediremi
Copy link
Contributor Author

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0