feat(ct): vue2 type-safe hook config (#17236)

This commit is contained in:
sand4rt 2022-09-13 06:00:09 +02:00 committed by GitHub
parent ab4876242f
commit eb3666328d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,13 +34,18 @@ export type PlaywrightTestConfig = Omit<BasePlaywrightTestConfig, 'use'> & {
}
};
type JsonPrimitive = string | number | boolean | null;
type JsonValue = JsonPrimitive | JsonObject | JsonArray;
type JsonArray = JsonValue[];
type JsonObject = { [Key in string]?: JsonValue };
type Slot = string | string[];
export interface MountOptions<Props = Record<string, unknown>> {
props?: Props;
slots?: Record<string, Slot> & { default?: Slot };
on?: Record<string, Function>;
hooksConfig?: any;
hooksConfig?: JsonObject;
}
interface MountResult<Props = Record<string, unknown>> extends Locator {