Skip to content

Commit 5c5d6b6

Browse files
committed
add openWith method which allows to provide turso database configured externally (for example, with sync support)
1 parent 94d7ef6 commit 5c5d6b6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

sdk/typescript/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ export class AgentFS {
8888
// Connect to the database to ensure it's created
8989
await db.connect();
9090

91+
return await AgentFS.openWith(db);
92+
}
93+
94+
static async openWith(db: Database): Promise<AgentFS> {
9195
// Create subsystems
9296
const kv = new KvStore(db);
9397
const fs = new Filesystem(db);

0 commit comments

Comments
 (0)