From e22621eb32ed61ba40501cb112aa3ea1cae8dd0b Mon Sep 17 00:00:00 2001 From: mikebender Date: Mon, 16 Oct 2023 11:21:37 -0400 Subject: [PATCH] Clean up some types specified in dh.types.ts - Will also have a follow up ticket to use the automatically generated types --- packages/jsapi-types/src/dh.types.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/jsapi-types/src/dh.types.ts b/packages/jsapi-types/src/dh.types.ts index ea1dcc76ab..cf3de117d2 100644 --- a/packages/jsapi-types/src/dh.types.ts +++ b/packages/jsapi-types/src/dh.types.ts @@ -336,6 +336,12 @@ export interface Figure extends Evented { close(): void; } +export type WidgetExportedObject = { + type: string; + fetch: () => Promise; + close: () => void; +}; + export interface Widget { readonly EVENT_MESSAGE: string; @@ -344,7 +350,10 @@ export interface Widget { listener: (event: unknown) => void ) => () => void; getDataAsBase64(): string; + getDataAsString(): string; + getDataAsU8(): Uint8Array; sendMessage: (message: string, references?: never[]) => void; + exportedObjects: WidgetExportedObject[]; } export interface FigureDataUpdatedEvent {