Skip to content

feat: fix types warning errors when importing from cypress component …#12

Open
cuongld2 wants to merge 1 commit intoqwikifiers:mainfrom
cuongld2:main
Open

feat: fix types warning errors when importing from cypress component …#12
cuongld2 wants to merge 1 commit intoqwikifiers:mainfrom
cuongld2:main

Conversation

@cuongld2
Copy link
Copy Markdown

@cuongld2 cuongld2 commented Mar 18, 2026

…tests

What is it?

  • Feature / enhancement : Fix types warning errors when importing cypress-qwik into cypress component test files

Description

The key fix: The mount function now accepts JSXOutput | JSXNode[] | FunctionComponent instead of just JSXNode, matching Qwik's render() function signature. This eliminates TypeScript errors when using syntax in tests.

Use cases and why

    1. Fix for error types

Screenshots/Demo

Before the fix

image
Argument of type 'JSXOutput' is not assignable to parameter of type 'JSXOutput | JSXNode<string | FunctionComponent<Record<string, any>>>[] | FunctionComponent<any>'.
  Type 'JSXNode<unknown>' is not assignable to type 'JSXOutput | JSXNode<string | FunctionComponent<Record<string, any>>>[] | FunctionComponent<any>'.
    Type 'JSXNode<unknown>' is missing the following properties from type 'JSXNode<string | FunctionComponent<Record<string, any>>>': immutableProps, flags

The syntax error is now gone
image

Checklist:

  • My code follows the developer guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • Added new tests to cover the fix / functionality

@cuongld2
Copy link
Copy Markdown
Author

@shairez @jordanpowell88 if you guys can have a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant