diff --git a/src/Umbraco.Web.UI.Client/src/core/resources/index.ts b/src/Umbraco.Web.UI.Client/src/core/resources/index.ts index b4dfcb2097..6da0dee4b6 100644 --- a/src/Umbraco.Web.UI.Client/src/core/resources/index.ts +++ b/src/Umbraco.Web.UI.Client/src/core/resources/index.ts @@ -1 +1,2 @@ export * from './resource.controller'; +export * from './tryExecuteAndNotify.method'; diff --git a/src/Umbraco.Web.UI.Client/src/core/resources/tryExecuteAndNotify.method.ts b/src/Umbraco.Web.UI.Client/src/core/resources/tryExecuteAndNotify.method.ts index 919ffcd7d9..ac1b9c860d 100644 --- a/src/Umbraco.Web.UI.Client/src/core/resources/tryExecuteAndNotify.method.ts +++ b/src/Umbraco.Web.UI.Client/src/core/resources/tryExecuteAndNotify.method.ts @@ -1,13 +1,12 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { UmbControllerHostInterface } from '../controller/controller-host.mixin'; -import type { ProblemDetails } from '../backend-api/models/ProblemDetails'; import { UmbResourceController } from './resource.controller'; import { UmbNotificationOptions } from 'src/core/notification'; -export async function tryExecuteAndNotify( +export function tryExecuteAndNotify( host: UmbControllerHostInterface, resource: Promise, options?: UmbNotificationOptions -): Promise<{ data?: T; error?: ProblemDetails }> { - return await new UmbResourceController(host, resource).tryExecuteAndNotify(options); +) { + return new UmbResourceController(host, resource).tryExecuteAndNotify(options); }