Why does the type gets omitted?
See original GitHub issueNot sure why the type is not being converted along with the rest of the properties. The problem is that I can’t get the type from within the entity.
For example I have a collection of polymorphic relationships drinks
. And it can be coffee
, tea
, milk
, etc. Processing a single drink
as it is I don’t know its type, because the current implementation assumes that I already know the type either from the relationship or from elsewhere.
So the input would look like this:
{
"drinks": [
{
"id": "1",
"type": "coffee"
},
{
"id": "5",
"type": "tea"
},
{
"id": "4",
"type": "milk"
}
]
}
And here’s the desired output:
"coffee": {
"1": {
"id": "1",
"type": "coffee"
},
},
"milk": {
"4": {
"id": "4",
"type": "milk"
},
},
"tea": {
"5": {
"id": "5",
"type": "tea"
}
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Omitted-variable bias - Wikipedia
In statistics, omitted-variable bias (OVB) occurs when a statistical model leaves out one or more relevant variables. The bias results in the model...
Read more >Why I can't omit properties from already omitted type?
It looks like it works if I change the OmitB type to: type OmitB<T extends B> = Omit<OmitA<T & B>, ...
Read more >How to stop letters being deleted while you're typing
Solution: click Insert. It's annoying, and not to mention confusing when you type amendments only to see the next letter disappear, but the...
Read more >Some characters missing or cut off when displayed on screen ...
When you view your document in Microsoft Word, some characters may be missing, or the top (or bottom) of some characters may be...
Read more >What Is Omitted Variable Bias? | Definition & Examples - Scribbr
Omitted variable bias occurs when a statistical model fails to include one or more relevant variables.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you. Published update to npm
Thank you for a such quick response!