diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 7338448a3e7..561aeefcc6a 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -464,6 +464,12 @@ module ts { return pathLen > extLen && path.substr(pathLen - extLen, extLen) === extension; } + export function getCanonicalFileName(fileName: string): string { + // if underlying system can distinguish between two files whose names differs only in cases then file name already in canonical form. + // otherwise use toLowerCase as a canonical form. + return sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase(); + } + export interface ObjectAllocator { getNodeConstructor(kind: SyntaxKind): new () => Node; getSymbolConstructor(): new (flags: SymbolFlags, name: string) => Symbol; diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 40e98821b68..7fdcac1795f 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -222,10 +222,4 @@ var sys: System = (function () { else { return undefined; // Unsupported host } -})(); - -function getCanonicalFileName(fileName: string): string { - // if underlying system can distinguish between two files whose names differs only in cases then file name already in canonical form. - // otherwise use toLowerCase as a canonical form. - return sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase(); -} +})(); \ No newline at end of file