Skip to content

Commit

Permalink
Clean up some types specified in dh.types.ts
Browse files Browse the repository at this point in the history
- Will also have a follow up ticket to use the automatically generated types
  • Loading branch information
mofojed committed Oct 16, 2023
1 parent 38118c9 commit e22621e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/jsapi-types/src/dh.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,12 @@ export interface Figure extends Evented {
close(): void;
}

export type WidgetExportedObject = {
type: string;
fetch: () => Promise<unknown>;
close: () => void;
};

export interface Widget {
readonly EVENT_MESSAGE: string;

Expand All @@ -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 {
Expand Down

0 comments on commit e22621e

Please sign in to comment.