diff --git a/.changeset/unlucky-cycles-invite.md b/.changeset/unlucky-cycles-invite.md new file mode 100644 index 000000000..9e54cc9dd --- /dev/null +++ b/.changeset/unlucky-cycles-invite.md @@ -0,0 +1,6 @@ +--- +'@shopify/ui-extensions': patch +--- + +Fix return type for RenderExtension to optionally return a clean up function +Remove unused RunnableExtension interface for Admin diff --git a/packages/ui-extensions/src/surfaces/admin/registration.ts b/packages/ui-extensions/src/surfaces/admin/registration.ts index 5cb55190a..4860319ba 100644 --- a/packages/ui-extensions/src/surfaces/admin/registration.ts +++ b/packages/ui-extensions/src/surfaces/admin/registration.ts @@ -1,9 +1,5 @@ export interface RenderExtension { - (root: HTMLElement, api: Api): Promise<() => void>; -} - -export interface RunnableExtension { - (api: Api): Output | Promise; + (root: HTMLElement, api: Api): Promise void)>; } export interface ExtensionRegistrationFunction {