Skip to content

Commit f215a0e

Browse files
committed
chore: export types for tests
1 parent 73169c2 commit f215a0e

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/utils/wasm.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { baseMockUser, type User } from "@/user";
44

55
export type WasmLoadState = "loaded" | "loading" | "error";
66

7-
type GoPreviewDef = (
7+
export type GoPreviewDef = (
88
/**
99
* A virtual filetree
1010
*/
@@ -13,15 +13,18 @@ type GoPreviewDef = (
1313
owner: WorkspaceOwner,
1414
) => Promise<string>;
1515

16-
// Extend the Window object to include the Go related code that is added from
17-
// wasm_exec.js and our loaded Go code.
18-
declare global {
19-
interface Window {
16+
export type ExtendedWindow = {
2017
// Loaded from wasm
2118
go_preview?: GoPreviewDef;
2219
Go: { new (): Go };
2320
CODE?: string;
2421
USERS?: User[];
22+
};
23+
24+
// Extend the Window object to include the Go related code that is added from
25+
// wasm_exec.js and our loaded Go code.
26+
declare global {
27+
interface Window extends ExtendedWindow {
2528
}
2629
}
2730

0 commit comments

Comments
 (0)