From 6074d373253717b39cad1be220e03dccdea87844 Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Fri, 20 Dec 2024 05:15:33 +0800 Subject: [PATCH] Update server.ts --- packages/typescript-plugin/lib/server.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/typescript-plugin/lib/server.ts b/packages/typescript-plugin/lib/server.ts index dd11753812..ec18db7091 100644 --- a/packages/typescript-plugin/lib/server.ts +++ b/packages/typescript-plugin/lib/server.ts @@ -65,7 +65,7 @@ export async function startNamedPipeServer( getFileId: (fileName: string) => fileName, }; const dataChunks: Buffer[] = []; - const componentNamesSubscriptions = new Map>, Set]>(); + const componentNamesSubscriptions = new Map | Awaited>, Set]>(); const server = net.createServer(connection => { connection.on('data', buffer => { dataChunks.push(buffer); @@ -203,12 +203,12 @@ export async function startNamedPipeServer( else if (requestType === 'subscribeAllComponentAndProps') { let subscriptions = componentNamesSubscriptions.get(args[0]); if (!subscriptions) { - const result = await getComponentAndProps.apply(requestContext, args as any); + const result = getComponentAndProps.apply(requestContext, args as any); subscriptions = [result, new Set()]; componentNamesSubscriptions.set(args[0], subscriptions); } subscriptions[1].add(connection); - sendResponse(subscriptions[0]); + sendResponse(await subscriptions[0]); } else { console.warn('[Vue Named Pipe Server] Unknown request:', requestType);