Skip to content

Commit

Permalink
fix(typescript-plugin): unknown request type warning (#4715)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmatter authored Aug 24, 2024
1 parent 1fcd22d commit 8592f9e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packages/typescript-plugin/lib/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,27 @@ export async function startNamedPipeServer(
}
const request: Request = JSON.parse(text);
const fileName = request.args[0];
const requestContext: RequestContext = {
typescript: ts,
languageService: info.languageService,
languageServiceHost: info.languageServiceHost,
language: language,
isTsPlugin: true,
getFileId: (fileName: string) => fileName,
};
if (request.type === 'containsFile') {
sendResponse(
info.project.containsFile(ts.server.toNormalizedPath(fileName))
);
}
if (request.type === 'projectInfo') {
else if (request.type === 'projectInfo') {
sendResponse({
name: info.project.getProjectName(),
kind: info.project.projectKind,
currentDirectory: info.project.getCurrentDirectory(),
} satisfies ProjectInfo);
}
const requestContext: RequestContext = {
typescript: ts,
languageService: info.languageService,
languageServiceHost: info.languageServiceHost,
language: language,
isTsPlugin: true,
getFileId: (fileName: string) => fileName,
};
if (request.type === 'collectExtractProps') {
else if (request.type === 'collectExtractProps') {
const result = collectExtractProps.apply(requestContext, request.args as any);
sendResponse(result);
}
Expand Down

0 comments on commit 8592f9e

Please sign in to comment.