Skip to content

Commit bf71de7

Browse files
committed
fix: export useful types for consumer
1 parent aebb275 commit bf71de7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/fixtures.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import type { Fixtures, Page } from "@playwright/test";
44
* Map of fixture names to PageObject constructors.
55
* Each constructor receives `page` as the first argument.
66
*/
7-
type PageObjectConstructorsMap = Record<string, new (page: Page) => unknown>;
7+
export type PageObjectConstructorsMap = Record<string, new (page: Page) => unknown>;
88

99
/** Maps constructor map to instance types for Fixtures. */
10-
type FixturesFromMap<T extends PageObjectConstructorsMap> = {
10+
export type FixturesFromMap<T extends PageObjectConstructorsMap> = {
1111
[K in keyof T]: InstanceType<T[K]>;
1212
};
1313

src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ export {
2323
export { createFixtures } from "./fixtures";
2424
export { ListPageObject } from "./page-objects/ListPageObject";
2525
export { PageObject } from "./page-objects/PageObject";
26+
27+
export type { PageObjectConstructor, SelectorType } from "./page-objects/PageObject";
28+
export type { FixturesFromMap, PageObjectConstructorsMap } from "./fixtures";

0 commit comments

Comments
 (0)