Handle walkThroughSnippet:/ and untitled:/ as dynamic files (#36722)

Handle walkThroughSnippet:/ and untitled:/ as dynamic files
Fixes #36681
This commit is contained in:
Sheetal Nandi
2020-02-10 13:55:43 -08:00
committed by GitHub
parent fa3173f8f6
commit 70e6f5b8a0
5 changed files with 217 additions and 199 deletions
+2
View File
@@ -273,6 +273,8 @@ namespace ts.server {
/*@internal*/
export function isDynamicFileName(fileName: NormalizedPath) {
return fileName[0] === "^" ||
((stringContains(fileName, "walkThroughSnippet:/") || stringContains(fileName, "untitled:/")) &&
getBaseFileName(fileName)[0] === "^") ||
(stringContains(fileName, ":^") && !stringContains(fileName, directorySeparator));
}