How can I properly type this composition to return ComponentInstance #10249
Unanswered
Mehdi-Hp
asked this question in
Help/Questions
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.
-
I have this composition which gets a Component as "parentComponent" and checks if the current instance is living inside the parentComponent.
If I remove the
as
assertion, I getType 'ComponentInternalInstance' is not assignable to type 'ComponentInstance<T>'.
Am I doing it right? And why is there so little info for these types in the docs?
Update: My solution is wrong, because:
Beta Was this translation helpful? Give feedback.
All reactions