-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix missing global shopify type for Admin #2493
Conversation
This comment has been minimized.
This comment has been minimized.
/snapit |
🫰✨ Thanks @vividviolet! Your snapshots have been published to npm. Test the snapshots by updating your "@shopify/data-extensions": "0.0.0-snapshot-20241125211200",
"@shopify/ui-extensions": "0.0.0-snapshot-20241125211200",
"@shopify/ui-extensions-react": "0.0.0-snapshot-20241125211200" |
The global is now fixed. |
/snapit |
ec46466
to
85bd2fe
Compare
/snapit |
🫰✨ Thanks @vividviolet! Your snapshots have been published to npm. Test the snapshots by updating your "@shopify/data-extensions": "0.0.0-snapshot-20241127163639",
"@shopify/ui-extensions": "0.0.0-snapshot-20241127163639",
"@shopify/ui-extensions-react": "0.0.0-snapshot-20241127163639" |
ddc97dd
to
4f8ebb5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't tophat but looks good ✨ I have no idea what le_shopify
was and it doesn't exist anywhere. I guess it was a typo 🤷 or the Quebecois API we unshipped 🇨🇦
// conflicts with build/ts/globals.d.ts | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
const shopify: ShopifyGlobal; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll also need to patch the checkout-web
fork of this file otherwise it might get accidentally reset during our publishing process. This is annoying, sorry 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, will do
Background
The
shopify
global declaration was incorrect all along. With these changes doingshopify.extend
inside an extension now works to pick up the types.Try this out by consuming the snapshot build and inside an extension either use the
/// <reference types="@shopify/ui-extensions/admin" />
or import theextension
function.