mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
tsb should handle .js suffix (#227544)
fixes https://github.com/microsoft/vscode/issues/227540
This commit is contained in:
@@ -660,7 +660,10 @@ class LanguageServiceHost implements ts.LanguageServiceHost {
|
||||
|
||||
while (!found && dirname.indexOf(stopDirname) === 0) {
|
||||
dirname = path.dirname(dirname);
|
||||
const resolvedPath = path.resolve(dirname, ref.fileName);
|
||||
let resolvedPath = path.resolve(dirname, ref.fileName);
|
||||
if (resolvedPath.endsWith('.js')) {
|
||||
resolvedPath = resolvedPath.slice(0, -3);
|
||||
}
|
||||
const normalizedPath = normalize(resolvedPath);
|
||||
|
||||
if (this.getScriptSnapshot(normalizedPath + '.ts')) {
|
||||
|
||||
Reference in New Issue
Block a user