© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
Building Option.Some instead of Option.Option - Effect Community
EC
Effect Community
•
3y ago
•
16 replies
Jérôme MARTIN
Building Option.Some instead of Option.Option
I was wondering if there existed a way to build an Option
.some of type Option
.Some and not Option
.Option
? Most of the time
, when I write
:
const o = Option.some(1)
const o = Option.some(1)
I want o to be of type Option
.Option
. But
, on some rare occasions
, I need it to be Option
.Some
. So far
, I use
:
as Option.Some<X>
as Option.Some<X>
but was wondering if there were another way
.
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
Using Option instead of Undefined or Null in Codebase
EC
Effect Community / data
3y ago
Removal of `Option.Applicative` and `ReadonlyRecord.traverse`
EC
Effect Community / data
3y ago
Concerns About Making Hash and Equal Own Properties Instead of Prototype
EC
Effect Community / data
5mo ago
Is Option.firstSomeOf expected to work with an array of Data.taggedEnum<AlgebraicDataType?
EC
Effect Community / data
2y ago