Closed
Description
π Search Terms
5.8, return, type
π Version & Regression Information
- This changed between versions 5.7.3 and 5.8
β― Playground Link
No response
π» Code
I defined custom ElementChildrenAttribute
, it work well before TS 5.8
declare global {
namespace JSX {
// infer children type
export interface ElementChildrenAttribute {
$default: {};
}
}
}
Once I upgrade to TS 5.8, JSX like below throw the errors.
const $el = <div>test</div>
π Actual behavior
Type { children: Element[]; } is not assignable to type
π Expected behavior
no errors
Additional information about the issue
full custom JSX declare
https://github.com/innoai-tech/vuekit/blob/main/nodepkg/vue-jsx-runtime/src/jsx-runtime.ts#L104-L153
Metadata
Metadata
Assignees
Labels
No labels