Cannot get properties of complex type
See original GitHub issueDescribe the bug I have a complex type where i can pass some “selection” to a function and this function will return subset type: From https://stackoverflow.com/a/51968630/3021445
interface Data {
one: string;
two: number;
three: {
four: string;
five: {
six: Date;
};
};
}
declare const data: Data;
const result = select(data, { one: true, three: { five: { six: true } } });
// Here the "result" variable type will have all fields except "two" and "four"
I need to get "result" variable fields, but for some reason when i try to get type of "three" variable it becomes "any" type.
Version: 11.0.0
To Reproduce
I create codesandbox where you can play https://codesandbox.io/s/goofy-diffie-owje4?file=/src/utils.ts:1470-1527
Expected behavior
I am able to get correct type object for complex types
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Get complex type properties from PropertyInfo - Stack Overflow
I would like pass the complex property as parameter, but at this moment the property variable is a PropertyInfo and I need the...
Read more >Complex Type properties - Breeze
Complex types do not have identities (key properties in breeze) and therefore cannot exist independently. Complex types can only exist as properties on ......
Read more >Complex Types - EF Designer - EF6 - Microsoft Learn
Properties of a complex type can be scalar types or existing complex types. However, complex type properties cannot have circular references.
Read more >Working with objects - JavaScript - MDN Web Docs - Mozilla
The same way, JavaScript objects can have properties, which define their ... Define the object type by writing a constructor function.
Read more >Making Complex Types Useful with Entity Framework 6 ...
With a Complex Type, if you need to add an apartment number property to your address structure, you would just update the Complex...
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
@aspirisen sorry, I didn’t see the all the files in the code sandbox. I will take a look at this soon.
@dsherret i have empty array