Compare commits

..

2 commits

View file

@ -225,7 +225,8 @@ export default function(filename, options = {}) {
let program = ts.createProgram([filename], options)
let checker = program.getTypeChecker()
const sourceFiles = program.getSourceFiles()
let sourceFile = sourceFiles.find(file => file.fileName === filename)
const filenameUnix = filename.replaceAll('\\', '/')
let sourceFile = sourceFiles.find(file => file.fileName === filenameUnix)
ts.forEachChild(sourceFile, visit(node, checker))