Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
How to type either - Theo's Typesafe Cult
TTC
Theo's Typesafe Cult
•
4y ago
•
10 replies
6enton
How to type either
Quick question
. I have an object I
'm passing as a parameter
. It has the shape
{
id
: number,
name
: string,
foo
: Partial
<
SomeObject
>
}
{
id
: number,
name
: string,
foo
: Partial
<
SomeObject
>
}
I need either or both id and name
, and I require foo
. How would I go about typing this
?
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
How to automatically add type prefix to type imports?
TTC
Theo's Typesafe Cult / questions
3y ago
How to type DynamoDB GetCommand
TTC
Theo's Typesafe Cult / questions
3y ago
How to type react element arguments
TTC
Theo's Typesafe Cult / questions
16mo ago