@@ -73,7 +73,7 @@ namespace ts {
7373 * when enumerating the directory.
7474 */
7575 readDirectory ( rootDir : string , extension : string , exclude ?: string , include ?: string ) : string ;
76- useCaseSensitiveFileNames ?: boolean ;
76+ useCaseSensitiveFileNames ?( ) : boolean ;
7777 }
7878
7979 ///
@@ -411,15 +411,7 @@ namespace ts {
411411 public useCaseSensitiveFileNames : boolean ;
412412
413413 constructor ( private shimHost : CoreServicesShimHost ) {
414- if ( typeof shimHost . useCaseSensitiveFileNames === "boolean" ) {
415- this . useCaseSensitiveFileNames = shimHost . useCaseSensitiveFileNames ;
416- }
417- else if ( sys ) {
418- this . useCaseSensitiveFileNames = sys . useCaseSensitiveFileNames ;
419- }
420- else {
421- this . useCaseSensitiveFileNames = true ;
422- }
414+ this . useCaseSensitiveFileNames = this . shimHost . useCaseSensitiveFileNames ? this . shimHost . useCaseSensitiveFileNames ( ) : false ;
423415 }
424416
425417 public readDirectory ( rootDir : string , extensions : string [ ] , exclude : string [ ] , include : string [ ] ) : string [ ] {
@@ -435,7 +427,7 @@ namespace ts {
435427 JSON . stringify ( include ) ) ) ;
436428 }
437429 catch ( e ) {
438- let results : string [ ] = [ ] ;
430+ const results : string [ ] = [ ] ;
439431 for ( const extension of extensions ) {
440432 for ( const file of this . readDirectoryFallback ( rootDir , extension , exclude ) )
441433 {
0 commit comments