Repository navigation
Using AutoPath to get the type of a property inside a single object type declaration #334
Unanswered
svenliebig
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hey, I wanted to create a type that works similar to the
getfunction declaration in the ts-toolbelt examples, but only within an object. The background story to that is some React Component Properties specific thing. My problem is that I do not have the object as value where I want to use this type, so I can not infer all the generics by default, I have to set one. But here I encounter some problems:I also added this to a codesandbox: https://codesandbox.io/s/ts-toolbelt-forked-vl0mrh?file=/src/index.ts
Does someone has a better idea how to get this working?
Thank you!
All reactions