Skip to content

Commit fd4dd2b

Browse files
authored
Merge pull request #2493 from Shopify/fix-global
Fix missing global shopify type for Admin
2 parents 38c3f8d + 4f8ebb5 commit fd4dd2b

File tree

6 files changed

+25
-18
lines changed

6 files changed

+25
-18
lines changed

.changeset/spicy-mugs-drop.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/ui-extensions': patch
3+
---
4+
5+
Fix shopify global declaration

packages/ui-extensions/src/surfaces/admin.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ export * from './admin/components';
33
export * from './admin/extension-targets';
44
export * from './admin/extension';
55
export * from './admin/shared';
6+
export * from './admin/globals';

packages/ui-extensions/src/surfaces/admin/globals.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,10 @@ export interface ShopifyGlobal {
66
extend: ExtensionTargets[ExtensionTarget],
77
): void;
88
}
9+
10+
declare global {
11+
// conflicts with build/ts/globals.d.ts
12+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
13+
// @ts-ignore
14+
const shopify: ShopifyGlobal;
15+
}

packages/ui-extensions/src/surfaces/checkout/globals.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ export interface ShopifyGlobal {
99
}
1010

1111
declare global {
12-
interface WorkerGlobalScope {
13-
// conflicts with packages/checkout-ui-extensions/build/ts/globals.d.ts
14-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
15-
// @ts-ignore
16-
readonly le_shopify: ShopifyGlobal;
17-
}
12+
// conflicts with build/ts/globals.d.ts
13+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
14+
// @ts-ignore
15+
const shopify: ShopifyGlobal;
1816
}

packages/ui-extensions/src/surfaces/customer-account/globals.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ export interface ShopifyGlobal {
99
}
1010

1111
declare global {
12-
interface WorkerGlobalScope {
13-
// conflicts with packages/checkout-ui-extensions/build/ts/globals.d.ts
14-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
15-
// @ts-ignore
16-
readonly le_shopify: ShopifyGlobal;
17-
}
12+
// conflicts with build/ts/globals.d.ts
13+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
14+
// @ts-ignore
15+
const shopify: ShopifyGlobal;
1816
}

packages/ui-extensions/src/surfaces/point-of-sale/globals.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ export interface ShopifyGlobal {
99
}
1010

1111
declare global {
12-
interface WorkerGlobalScope {
13-
// conflicts with build/ts/globals.d.ts
14-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
15-
// @ts-ignore
16-
readonly shopify: ShopifyGlobal;
17-
}
12+
// conflicts with build/ts/globals.d.ts
13+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
14+
// @ts-ignore
15+
const shopify: ShopifyGlobal;
1816
}

0 commit comments

Comments
 (0)