Merge pull request #4627 from Microsoft/backslashesInTranspile

allow backslashes in fileName argument of the transpile function
This commit is contained in:
Vladimir Matveev
2015-09-03 13:29:27 -07:00
2 changed files with 7 additions and 3 deletions

View File

@@ -1866,7 +1866,7 @@ namespace ts {
let sourceMapText: string;
// Create a compilerHost object to allow the compiler to read and write files
let compilerHost: CompilerHost = {
getSourceFile: (fileName, target) => fileName === inputFileName ? sourceFile : undefined,
getSourceFile: (fileName, target) => fileName === normalizeSlashes(inputFileName) ? sourceFile : undefined,
writeFile: (name, text, writeByteOrderMark) => {
if (fileExtensionIs(name, ".map")) {
Debug.assert(sourceMapText === undefined, `Unexpected multiple source map outputs for the file '${name}'`);