We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VNode
Describe the bug Noticed that the return type of h/createElement doesn't match VNode anymore.
h/createElement
To Reproduce
This snippet throws a type error:
import { type VNode, h } from "preact"; const arr: VNode[] = [] arr.push(h("div", null))
Expected behavior No type errors
The text was updated successfully, but these errors were encountered:
They do seem to be returning a valid VNode, I wonder how they diverge https://github.com/preactjs/preact/blob/main/src/index.d.ts#L190-L236
also does not error for me here https://stackblitz.com/edit/typescript-cgdesq?file=index.ts,package.json
EDIT had to enable strict mode it's something with null
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Describe the bug
Noticed that the return type of
h/createElement
doesn't matchVNode
anymore.To Reproduce
This snippet throws a type error:
Expected behavior
No type errors
The text was updated successfully, but these errors were encountered: