Created
January 24, 2024 08:41
-
-
Save shadone/f5d0a6eb644bdef45ed7ae171d1c9e20 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JS: | |
import { DeliveryMethod, WebhookHandler } from "@shopify/shopify-api"; | |
export default { | |
Foo: { // the value is of type WebhookHandler | |
deliveryMethod: DeliveryMethod.Http | |
} | |
} | |
TS (ugly): | |
import { DeliveryMethod, WebhookHandler } from "@shopify/shopify-api"; | |
type Webhooks = { | |
[key: string]: WebhookHandler, | |
}; | |
const webooks: Webhooks = { | |
Foo: { // the value is of type WebhookHandler | |
deliveryMethod: DeliveryMethod.Http | |
} | |
} | |
export default webooks; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment