We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f041b7d + 82991cd commit 94609d5Copy full SHA for 94609d5
.changeset/unlucky-cycles-invite.md
@@ -0,0 +1,6 @@
1
+---
2
+'@shopify/ui-extensions': patch
3
4
+
5
+Fix return type for RenderExtension to optionally return a clean up function
6
+Remove unused RunnableExtension interface for Admin
packages/ui-extensions/src/surfaces/admin/registration.ts
@@ -1,9 +1,5 @@
export interface RenderExtension<Api> {
- (root: HTMLElement, api: Api): Promise<() => void>;
-}
-
-export interface RunnableExtension<Api, Output> {
- (api: Api): Output | Promise<Output>;
+ (root: HTMLElement, api: Api): Promise<void | (() => void)>;
7
}
8
9
export interface ExtensionRegistrationFunction<ExtensionTargets> {
0 commit comments