Skip to content

Instantly share code, notes, and snippets.

@shadone
Created January 24, 2024 08:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shadone/f5d0a6eb644bdef45ed7ae171d1c9e20 to your computer and use it in GitHub Desktop.
Save shadone/f5d0a6eb644bdef45ed7ae171d1c9e20 to your computer and use it in GitHub Desktop.
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