Skip to content

Commit 7b8e4ea

Browse files
committed
Added remotefilesource types (DH-20578)
1 parent ed60852 commit 7b8e4ea

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

src/dh/modules.d.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,35 @@ declare module '@deephaven-enterprise/jsapi-types' {
88
}
99

1010
export {};
11+
12+
/**
13+
* TODO: These types were copied from core until deephaven/deephaven-core#7451
14+
* merges / is released. Then we can do a version bump of jsapi-types and remove
15+
* this module augmentation.
16+
*/
17+
declare module '@deephaven/jsapi-types' {
18+
namespace dh {
19+
interface CoreClient {
20+
getRemoteFileSourceService(): Promise<dh.remotefilesource.RemoteFileSourceService>;
21+
}
22+
}
23+
24+
namespace dh.remotefilesource {
25+
interface ResourceRequestEvent {
26+
respond(content: string | Uint8Array | undefined | null): void;
27+
get resourceName(): string;
28+
}
29+
30+
class RemoteFileSourceService {
31+
static readonly EVENT_REQUEST_SOURCE: string;
32+
33+
addEventListener<T>(
34+
name: string,
35+
callback: (e: dh.Event<T>) => void
36+
): () => void;
37+
38+
setExecutionContext(resourcePaths?: string[]): Promise<boolean>;
39+
close(): void;
40+
}
41+
}
42+
}

0 commit comments

Comments
 (0)