Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Rename spawn

Tomas Valenta7a11630d23a4
diff --git a/packages/js-sdk/src/sandbox/index.ts b/packages/js-sdk/src/sandbox/index.ts
index f7dd4aed1..e06e6c5d1 100644
--- a/packages/js-sdk/src/sandbox/index.ts
+++ b/packages/js-sdk/src/sandbox/index.ts
@@ -55,9 +55,9 @@ export class Sandbox extends SandboxApi {
return url.toString()
}
- static async spawn<S extends typeof Sandbox>(this: S, opts?: SandboxOpts): Promise<InstanceType<S>>
- static async spawn<S extends typeof Sandbox>(this: S, template: string, opts?: SandboxOpts): Promise<InstanceType<S>>
- static async spawn<S extends typeof Sandbox>(this: S, templateOrOpts?: SandboxOpts | string, opts?: SandboxOpts): Promise<InstanceType<S>> {
+ static async create<S extends typeof Sandbox>(this: S, opts?: SandboxOpts): Promise<InstanceType<S>>
+ static async create<S extends typeof Sandbox>(this: S, template: string, opts?: SandboxOpts): Promise<InstanceType<S>>
+ static async create<S extends typeof Sandbox>(this: S, templateOrOpts?: SandboxOpts | string, opts?: SandboxOpts): Promise<InstanceType<S>> {
const { template, sandboxOpts } = typeof templateOrOpts === 'string'
? { template: templateOrOpts, sandboxOpts: opts }
: { template: this.defaultTemplate, sandboxOpts: templateOrOpts }