Skip to content

Commit 271914c

Browse files
committed
fix type errors
1 parent 19d26fa commit 271914c

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

sandbox.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
import { Command } from "@cliffy/command";
2+
import { Sandbox } from "@deno/sandbox";
3+
24
import { getAppFromConfig, readConfig } from "./config.ts";
35
import { renderTemporalTimestamp, withApp } from "./util.ts";
46
import { createTrpcClient } from "./auth.ts";
5-
import { Sandbox } from "@deno/sandbox";
7+
import type { GlobalOptions } from "./main.ts";
8+
9+
type SandboxContext = GlobalOptions & {
10+
org?: string;
11+
};
612

7-
export const sandboxListCommand = new Command()
13+
export const sandboxListCommand = new Command<SandboxContext>()
814
.description("List all sandboxes in an organization")
915
.action(async (options) => {
1016
const configContent = await readConfig(Deno.cwd(), options.config);
@@ -83,7 +89,7 @@ export const sandboxListCommand = new Command()
8389
}
8490
});
8591

86-
export const sandboxKillCommand = new Command()
92+
export const sandboxKillCommand = new Command<SandboxContext>()
8793
.description("Kill a running sandbox")
8894
.arguments("<sandbox-id:string>")
8995
.action(async (options, sandboxId) => {
@@ -119,7 +125,7 @@ export const sandboxKillCommand = new Command()
119125
}
120126
});
121127

122-
export const sandboxSshCommand = new Command()
128+
export const sandboxSshCommand = new Command<SandboxContext>()
123129
.description("SSH into a running sandbox")
124130
.arguments("<sandbox-id:string>")
125131
.action(async (options, sandboxId) => {

0 commit comments

Comments
 (0)