From 6cc7fcd02d5d37e6f6f6d5136d015fa69f4eb7e4 Mon Sep 17 00:00:00 2001 From: Michael Beckemeyer Date: Fri, 9 Aug 2024 13:12:20 +0200 Subject: [PATCH] Support for sync getApiMethods --- .changeset/shaggy-queens-brake.md | 6 ++++++ src/packages/runtime/api.ts | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/shaggy-queens-brake.md diff --git a/.changeset/shaggy-queens-brake.md b/.changeset/shaggy-queens-brake.md new file mode 100644 index 00000000..e74c20bf --- /dev/null +++ b/.changeset/shaggy-queens-brake.md @@ -0,0 +1,6 @@ +--- +"@open-pioneer/runtime": patch +"@open-pioneer/integration": patch +--- + +Allow synchronous `getApiMethods()` when implementing an `ApiExtension`. diff --git a/src/packages/runtime/api.ts b/src/packages/runtime/api.ts index dda7d97f..74cdcc5f 100644 --- a/src/packages/runtime/api.ts +++ b/src/packages/runtime/api.ts @@ -17,7 +17,7 @@ export interface ApiExtension { /** * Returns a set of methods that will be added to the web component's API. */ - getApiMethods(): Promise; + getApiMethods(): Promise | ApiMethods; } /**