This repository has been archived by the owner on Oct 9, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "feat: Enable type checking of component children"
This reverts commit 19aa2a9. This won't work, because vhtml handles the `props.children` attribute in a way different from how TypeScript expects things. TypeScript believes that: - A component with no child receives props.children === undefined - A component with one child receives props.children === typeof child - A component with multiple children receives [...children] However, vhtml always wraps children in an array, even if there is only 0 or 1 child. Because of this, enforcing strict type checking on children would result in incorrect type checks that could be actively harmful. See more discussion and example at: - developit/vhtml#19 (comment)
- Loading branch information