From 8eddfa2cfbd45c08eb0f1345897f2b7773a05de3 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Mon, 26 Feb 2018 23:05:24 +0100 Subject: [PATCH] Fix TypeScript features in Interactive Playground (fixes #44172) (#44443) --- extensions/typescript/src/typescriptServiceClient.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index f6344da0480..ad93f9502c1 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -581,7 +581,7 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient if (resource.scheme === fileSchemes.walkThroughSnippet || resource.scheme === fileSchemes.untitled) { const dirName = path.dirname(resource.path); const fileName = this.inMemoryResourcePrefix + path.basename(resource.path); - return resource.with({ path: path.join(dirName, fileName) }).toString(true); + return resource.with({ path: path.posix.join(dirName, fileName) }).toString(true); } } @@ -611,7 +611,7 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient const dirName = path.dirname(resource.path); const fileName = path.basename(resource.path); if (fileName.startsWith(this.inMemoryResourcePrefix)) { - resource = resource.with({ path: path.join(dirName, fileName.slice(this.inMemoryResourcePrefix.length)) }); + resource = resource.with({ path: path.posix.join(dirName, fileName.slice(this.inMemoryResourcePrefix.length)) }); } } return resource;