Skip to content

Commit 1dc5659

Browse files
authored
Merge pull request #55 from zed-industries/fix-typescript-client
Call toClient directly on ClientSideConnection constructor
2 parents d43b72f + 6472fb1 commit 1dc5659

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

typescript/acp.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,12 @@ export class ClientSideConnection implements Agent {
262262
input: WritableStream<Uint8Array>,
263263
output: ReadableStream<Uint8Array>,
264264
) {
265+
const client = toClient(this);
266+
265267
const handler = async (
266268
method: string,
267269
params: unknown,
268270
): Promise<unknown> => {
269-
const client = toClient(this);
270-
271271
switch (method) {
272272
case schema.CLIENT_METHODS.fs_write_text_file: {
273273
const validatedParams =

0 commit comments

Comments
 (0)