fix(types): Global JSX namespace is deprecated (#33949)

This commit is contained in:
Bill Collins 2024-12-12 01:09:19 +00:00 committed by GitHub
parent 22e58aa084
commit e4e562cac5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View File

@ -14,8 +14,10 @@
* limitations under the License.
*/
import type React from 'react';
export declare function beforeMount<HooksConfig>(
callback: (params: { hooksConfig?: HooksConfig; App: () => JSX.Element }) => Promise<void | JSX.Element>
callback: (params: { hooksConfig?: HooksConfig; App: () => React.JSX.Element }) => Promise<void | React.JSX.Element>
): void;
export declare function afterMount<HooksConfig>(
callback: (params: { hooksConfig?: HooksConfig }) => Promise<void>

View File

@ -14,6 +14,8 @@
* limitations under the License.
*/
import type React from 'react';
import type { TestType, Locator } from '@playwright/experimental-ct-core';
export interface MountOptions<HooksConfig> {
@ -22,12 +24,12 @@ export interface MountOptions<HooksConfig> {
export interface MountResult extends Locator {
unmount(): Promise<void>;
update(component: JSX.Element): Promise<void>;
update(component: React.JSX.Element): Promise<void>;
}
export const test: TestType<{
mount<HooksConfig>(
component: JSX.Element,
component: React.JSX.Element,
options?: MountOptions<HooksConfig>
): Promise<MountResult>;
}>;