preact-testing-library icon indicating copy to clipboard operation
preact-testing-library copied to clipboard

fix: correct type of `wrapper` property in `RenderOptions`

Open zetaraku opened this issue 1 year ago • 0 comments

What:

The type of wrapper property in RenderOptions is mistyped, causing the children prop to be inferred as any.

Screenshot

Why:

The wrapper property should be a component instead of an element, just like that in RenderHookOptions.

How:

The type of wrapper property in RenderOptions is changed from ComponentChild to ComponentType<{ children: Element }>.

Checklist:

  • [ ] Documentation added N/A
  • [ ] Tests N/A
  • [x] Typescript definitions updated
  • [x] Ready to be merged

zetaraku avatar Jun 17 '24 18:06 zetaraku