Skip to content

Conversation

@Sytten
Copy link
Collaborator

@Sytten Sytten commented May 24, 2024

Missing Null implementations

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.51%. Comparing base (304db5d) to head (826facc).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #317      +/-   ##
==========================================
+ Coverage   68.31%   68.51%   +0.19%     
==========================================
  Files          83       83              
  Lines       12237    12300      +63     
==========================================
+ Hits         8360     8427      +67     
+ Misses       3877     3873       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Sytten
Copy link
Collaborator Author

Sytten commented May 24, 2024

The conflict with the Null struct is kinda of annoying, we would also need a Nullable struct that has a IntoJs since Option returns undefined.

@DelSkayn
Copy link
Owner

DelSkayn commented Jun 4, 2024

I think this type should be called Nullable not Null since that already conflicts with the null value struct.
Nullable also makes more sense I think cause the type is a wrapper around a value which might be null.

Also instead of implementing FromParams and IntoArgs maybe it should instead just implement IntoJs and FromJs. Then they can be used in function params and everywhere else you would need the absence of a value to be null.

@Sytten
Copy link
Collaborator Author

Sytten commented Jun 4, 2024

Good point, I wasn't sure what we wanted to do with that since we have Opt that is FromParams only and we already have the Null struct so you can do Either<Value, Null> already. Do you want me to remove function::Null since it's already in the codebase (I didn't create that struct, it must be from an earlier iteration)?

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.

3 participants