© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
Making onNoneEncoding optional with a default value of null - Effect Community
EC
Effect Community
•
2y ago
•
27 replies
Vincent François
Making onNoneEncoding optional with a default value of null
Hi
! I was wondering if it would not be a good idea to have the
onNoneEncoding
onNoneEncoding
prop of
OptionFromNullishOr
OptionFromNullishOr
be optional and defaulting to
null
null
We only use it in that case in our codebase so it would make the code easier to read and I feel like
null
null
would be the natural default value but I might be biaised
.
Have you thought about it
?
I could do the P
.R
. for it if you think it
's a good idea
.
Effect Community
Join
Production-grade applications in TypeScript.
6,221
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Maintaining Optional Type with Default Value in TypeScript
EC
Effect Community / schema
3y ago
Handling `null | undefined` values in optional fields of a struct and replacing them with a default
EC
Effect Community / schema
3y ago
Setting Default Timestamp Value with `Clock.currentTimeMillis` in `S.optional`
EC
Effect Community / schema
2y ago
Decoding a nullable string to a non-nullable string with a default value
EC
Effect Community / schema
11mo ago