Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Getting one of optional types - Theo's Typesafe Cult
TTC
Theo's Typesafe Cult
•
4y ago
•
4 replies
Patryk Makowski
Getting one of optional types
Hi everyone
, how can I get one of the types of
| type
? I can
't create subtypes as the type is generated
(Sub1
| Sub2 is impossible
)
.
https://www.typescriptlang.org/play?#code/C4TwDgpgBAogHgQwLZgDbQLxQN4CgoFQD6RokAdshAFxQBEAigK4QBOId+hSECAzk1YQ+tPIXHFS4CJR606ERCnQBGThMIALCNtp9grAJbkA5lwIBfXBagAfHOclkZVeczYdHPfoOGjH4iTOsjT0ishoEABM6hpQwMLAegbGZuJWVrgA9FlQmgD2AO5QAMYI5FCGUCYQwFD55ND5AGbxBXzQznwA-LjOUABKwkyowCpQWGKEQdIhbizssQQ8fAJCIg5xTrOuYUqRagFaOqH6RqaOGbjZuf1DAqMTUADK+TwA4jJshiUAYkzkEoAHngEXQABo6N41sI6OC9mCIGoAHw3eqsKB8N61TSpKCoQwAa06uL4QA
TS Playground - An online editor for exploring TypeScript and JavaS...
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way
.
Theo's Typesafe Cult
Join
26,564
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Error with Optional One-to-Many relational query
TTC
Theo's Typesafe Cult / questions
3y ago
Battling TypeScript Types
TTC
Theo's Typesafe Cult / questions
4y ago
TypeScript Mapped Types
TTC
Theo's Typesafe Cult / questions
4y ago