Skip to content

Commit

Permalink
Merge pull request #2493 from Shopify/fix-global
Browse files Browse the repository at this point in the history
Fix missing global shopify type for Admin
  • Loading branch information
vividviolet authored Nov 29, 2024
2 parents 38c3f8d + 4f8ebb5 commit fd4dd2b
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 18 deletions.
5 changes: 5 additions & 0 deletions .changeset/spicy-mugs-drop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/ui-extensions': patch
---

Fix shopify global declaration
1 change: 1 addition & 0 deletions packages/ui-extensions/src/surfaces/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export * from './admin/components';
export * from './admin/extension-targets';
export * from './admin/extension';
export * from './admin/shared';
export * from './admin/globals';
7 changes: 7 additions & 0 deletions packages/ui-extensions/src/surfaces/admin/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@ export interface ShopifyGlobal {
extend: ExtensionTargets[ExtensionTarget],
): void;
}

declare global {
// conflicts with build/ts/globals.d.ts
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const shopify: ShopifyGlobal;
}
10 changes: 4 additions & 6 deletions packages/ui-extensions/src/surfaces/checkout/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ export interface ShopifyGlobal {
}

declare global {
interface WorkerGlobalScope {
// conflicts with packages/checkout-ui-extensions/build/ts/globals.d.ts
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
readonly le_shopify: ShopifyGlobal;
}
// conflicts with build/ts/globals.d.ts
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const shopify: ShopifyGlobal;
}
10 changes: 4 additions & 6 deletions packages/ui-extensions/src/surfaces/customer-account/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ export interface ShopifyGlobal {
}

declare global {
interface WorkerGlobalScope {
// conflicts with packages/checkout-ui-extensions/build/ts/globals.d.ts
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
readonly le_shopify: ShopifyGlobal;
}
// conflicts with build/ts/globals.d.ts
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const shopify: ShopifyGlobal;
}
10 changes: 4 additions & 6 deletions packages/ui-extensions/src/surfaces/point-of-sale/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ export interface ShopifyGlobal {
}

declare global {
interface WorkerGlobalScope {
// conflicts with build/ts/globals.d.ts
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
readonly shopify: ShopifyGlobal;
}
// conflicts with build/ts/globals.d.ts
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const shopify: ShopifyGlobal;
}

0 comments on commit fd4dd2b

Please sign in to comment.