File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -464,6 +464,12 @@ module ts {
464464 return pathLen > extLen && path . substr ( pathLen - extLen , extLen ) === extension ;
465465 }
466466
467+ export function getCanonicalFileName ( fileName : string ) : string {
468+ // if underlying system can distinguish between two files whose names differs only in cases then file name already in canonical form.
469+ // otherwise use toLowerCase as a canonical form.
470+ return sys . useCaseSensitiveFileNames ? fileName : fileName . toLowerCase ( ) ;
471+ }
472+
467473 export interface ObjectAllocator {
468474 getNodeConstructor ( kind : SyntaxKind ) : new ( ) => Node ;
469475 getSymbolConstructor ( ) : new ( flags : SymbolFlags , name : string ) => Symbol ;
Original file line number Diff line number Diff line change @@ -222,10 +222,4 @@ var sys: System = (function () {
222222 else {
223223 return undefined ; // Unsupported host
224224 }
225- } ) ( ) ;
226-
227- function getCanonicalFileName ( fileName : string ) : string {
228- // if underlying system can distinguish between two files whose names differs only in cases then file name already in canonical form.
229- // otherwise use toLowerCase as a canonical form.
230- return sys . useCaseSensitiveFileNames ? fileName : fileName . toLowerCase ( ) ;
231- }
225+ } ) ( ) ;
You can’t perform that action at this time.
0 commit comments