Skip to content

Commit

Permalink
Enable useCaseSensitiveFileNames to fix a bug in the environments wit…
Browse files Browse the repository at this point in the history
…h case insensitive filesystems (Mac/Windows).
  • Loading branch information
yunabe committed May 18, 2023
1 parent 4be149f commit cedbac2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/converter.ts
Expand Up @@ -164,10 +164,12 @@ export function createConverter(options?: ConverterOptions): Converter {
let builder: ts.BuilderProgram = null;

const sys = Object.create(ts.sys) as ts.System;
let rebuildTimer: RebuildTimer = null;
// TODO(yunabe): Instead of enabling this, normalize filenames based on this flag.
sys.useCaseSensitiveFileNames = true;
sys.getCurrentDirectory = function () {
return cwd;
};
let rebuildTimer: RebuildTimer = null;
sys.setTimeout = (callback: (...args: any[]) => void): any => {
// TypeScript compier implements debouncing using a timer.
// It clears a timer when a new change is notified before the timer
Expand Down

0 comments on commit cedbac2

Please sign in to comment.