Skip to content

Commit 844b1e0

Browse files
authored
fix: exported data from playwright-tools (#32)
Added interface for data module GlobalSettings type changed to interface
1 parent 3def534 commit 844b1e0

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

data/globalSettings.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ export const globalSettings = {
115115
},
116116
} satisfies Record<string, object>;
117117

118-
export type GlobalSettings = typeof globalSettings;
118+
type GlobalSettingsType = typeof globalSettings;
119+
120+
export interface GlobalSettings extends GlobalSettingsType {}
119121
export type PartialGlobalSettings = {
120122
[Key in keyof GlobalSettings]?: Partial<GlobalSettings[Key]>;
121123
};

data/index.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export type { CacheSettings } from './cacheSettings';
2+
export { cacheSettings } from './cacheSettings';
3+
4+
export { extraHttpHeaders } from './extraHttpHeaders';
5+
6+
export type { GlobalSettings, PartialGlobalSettings } from './globalSettings';
7+
export { globalSettings } from './globalSettings';
8+
9+
export type { StorageState } from './storageStates';
10+
export { setState, getState, hasState, deleteState } from './storageStates';
11+
12+
export { testSlugs } from './testSlugs';

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@
3636
"import": "./auth/storage/index.js",
3737
"require": "./auth/storage/index.js"
3838
},
39+
"./data": {
40+
"types": "./data/index.d.ts",
41+
"import": "./data/index.js",
42+
"require": "./data/index.js"
43+
},
3944
"./fixtures": {
4045
"types": "./fixtures/index.d.ts",
4146
"import": "./fixtures/index.js",
@@ -60,7 +65,7 @@
6065
"scripts": {
6166
"prepare": "husky",
6267
"build": "tsc",
63-
"clean": "find actions auth data fixtures har utils -type f ! -name '.eslintrc.js' \\( -name '*.js' -o -name '*.d.ts' \\) -delete",
68+
"clean": "find actions auth data fixtures har storybook utils -type f ! -name '.eslintrc.js' \\( -name '*.js' -o -name '*.d.ts' \\) -delete",
6469
"typecheck": "tsc --noEmit",
6570
"lint": "eslint --ext .ts ./",
6671
"test": "jest --colors --config=jest.config.js",

0 commit comments

Comments
 (0)