@@ -43,6 +43,7 @@ function getTypeScript(typescript) {
4343 }
4444}
4545function checkAndNormalizeSettings ( settings ) {
46+ if ( settings === void 0 ) { settings = { } ; }
4647 var declarationFiles = settings . declarationFiles , noExternalResolve = settings . noExternalResolve , sortOutput = settings . sortOutput , typescript = settings . typescript , standardSettings = __rest ( settings , [ "declarationFiles" , "noExternalResolve" , "sortOutput" , "typescript" ] ) ;
4748 if ( settings . sourceRoot !== undefined ) {
4849 console . warn ( 'gulp-typescript: sourceRoot isn\'t supported any more. Use sourceRoot option of gulp-sourcemaps instead.' ) ;
@@ -65,10 +66,13 @@ function normalizeCompilerOptions(options) {
6566 options . sourceRoot = undefined ;
6667 options . inlineSources = false ;
6768}
68- function reportErrors ( errors , typescript ) {
69+ function reportErrors ( errors , typescript , ignore ) {
70+ if ( ignore === void 0 ) { ignore = [ ] ; }
6971 var reporter = _reporter . defaultReporter ( ) ;
7072 for ( var _i = 0 , errors_1 = errors ; _i < errors_1 . length ; _i ++ ) {
7173 var error = errors_1 [ _i ] ;
74+ if ( ignore . indexOf ( error . code ) !== - 1 )
75+ continue ;
7276 reporter . error ( utils . getError ( error , typescript ) , typescript ) ;
7377 }
7478}
@@ -103,11 +107,11 @@ function reportErrors(errors, typescript) {
103107 if ( tsConfig . error ) {
104108 console . log ( tsConfig . error . messageText ) ;
105109 }
106- var parsed = typescript . parseJsonConfigFileContent ( tsConfig . config || { } , typescript . sys , path . resolve ( projectDirectory ) , compilerOptions , path . basename ( tsConfigFileName ) ) ;
110+ var parsed = typescript . parseJsonConfigFileContent ( tsConfig . config || { } , getTsconfigSystem ( typescript ) , path . resolve ( projectDirectory ) , compilerOptions , path . basename ( tsConfigFileName ) ) ;
107111 rawConfig = parsed . raw ;
108112 tsConfigContent = parsed . raw ;
109113 if ( parsed . errors ) {
110- reportErrors ( parsed . errors , typescript ) ;
114+ reportErrors ( parsed . errors , typescript , [ 18003 ] ) ;
111115 }
112116 compilerOptions = parsed . options ;
113117 }
@@ -126,4 +130,12 @@ function reportErrors(errors, typescript) {
126130 }
127131 compile . filter = filter ;
128132} ) ( compile || ( compile = { } ) ) ;
133+ function getTsconfigSystem ( typescript ) {
134+ return {
135+ useCaseSensitiveFileNames : false ,
136+ readDirectory : function ( ) { return [ ] ; } ,
137+ fileExists : typescript . sys . fileExists ,
138+ readFile : typescript . sys . readFile
139+ } ;
140+ }
129141module . exports = compile ;
0 commit comments