Closed yw662 closed 2 years ago
It is solid 1.4.1 (with ^1.3.x in package.json) Within code:
import { Component } from 'solid-js' export const Tmp: Component<{ n: number }> = props => { return <> {props.children} </> }
TypeScript complaints that there is no children on props.
children
props
localhost
as shown above.
It might be a breaking change or sth, but I cannot find it in the doc. Should I always explicitly define it when a component need children ?
No response
yeah it is documented in #887. I hope it can be find somewhere in the doc.
Yes: https://www.solidjs.com/guides/typescript#component-types (and the change log)
Glad you found it though!
Describe the bug
It is solid 1.4.1 (with ^1.3.x in package.json) Within code:
TypeScript complaints that there is no
children
onprops
.Your Example Website or App
localhost
Steps to Reproduce the Bug or Issue
as shown above.
Expected behavior
It might be a breaking change or sth, but I cannot find it in the doc. Should I always explicitly define it when a component need children ?
Screenshots or Videos
No response
Platform
Additional context
No response