Skip to content

Commit 092a831

Browse files
committed
Clean up some types specified in dh.types.ts
- Will also have a follow up ticket to use the automatically generated types
1 parent e7573e3 commit 092a831

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

packages/jsapi-types/src/dh.types.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,12 @@ export interface Figure extends Evented {
336336
close(): void;
337337
}
338338

339+
export type WidgetExportedObject = {
340+
type: string;
341+
fetch: () => Promise<unknown>;
342+
close: () => void;
343+
};
344+
339345
export interface Widget {
340346
readonly EVENT_MESSAGE: string;
341347

@@ -344,7 +350,10 @@ export interface Widget {
344350
listener: (event: unknown) => void
345351
) => () => void;
346352
getDataAsBase64(): string;
353+
getDataAsString(): string;
354+
getDataAsU8(): Uint8Array;
347355
sendMessage: (message: string, references?: never[]) => void;
356+
exportedObjects: WidgetExportedObject[];
348357
}
349358

350359
export interface FigureDataUpdatedEvent {

0 commit comments

Comments
 (0)