Skip to content

Support for strict children support #23

@pikax

Description

@pikax

vuejs/core#8015

We need a way to force children to be of certain type or with certain prop types:

To correctly infer the type we need to use TSX & the actual component instance to infer the exact instance type, in JSX is impossible to retrieve the instance type with a return.

Because of this limitation, we must render the elements in TSX, so to get this working we need to have another file to do children typecheck, it would be very similar to the template file, but just handling the children typecheck, or if we can inject this information into the template, but it might introduce a lot of noise on the file and make it much harder to test.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions