fix(language-core): only exclude already-set props from inherited attrs when checkRequiredFallthroughAttributes is enabled#6088
Conversation
…equiredFallthroughAttributes` is enabled
|
Does this really fix the issue? It looks like if |
|
When this option is enabled, inheriting all props from the inner component unchanged can still report required props as missing when the wrapper component is used, even if those required props have already been passed through. Excluding them is therefore reasonable. If you still need these props to be externally overridable, define them explicitly. |
|
I thought they would simply be changed the optional props, no? That was the impression I got from the documentation. |
|
If it becomes optional and a prop with the same name is also explicitly defined, the two prop types will be merged into a union. This behavior was mentioned in #5882 (comment). |
|
I see. I'm not sure that's ideal, but I suppose I'll find out if it actually causes any problems once this patch releases, since I do have that option enabled in my project. As long as the errors I indicated in my issue still go away, it's probably fine, at least for now. In any case, thanks so much for the quick response! I really appreciate how well-maintained you keep this library. :) |
|
This is an artifact of the current codegen colliding with a TS quirk. It would of course be nice to avoid it, but doing so could introduce significantly more complex codegen logic and potential TS performance issues, so I chose to sidestep it. |
|
Thanks for your understanding :) |
|
Yeah, I updated and it looks like I was right. The error still occurs when I can open a new issue for this if desirable. |
|
Feel free to open a new one. |
fix #6082