From 092a83164599e29da9494927b6842248172da721 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 9b889f865f..d8cd8bf65a 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 {