File tree Expand file tree Collapse file tree
tests/baselines/reference/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1179,11 +1179,11 @@ namespace ts {
11791179 return emitResult ;
11801180 }
11811181
1182- function getSourceFile ( fileName : string ) : SourceFile {
1182+ function getSourceFile ( fileName : string ) : SourceFile | undefined {
11831183 return getSourceFileByPath ( toPath ( fileName ) ) ;
11841184 }
11851185
1186- function getSourceFileByPath ( path : Path ) : SourceFile {
1186+ function getSourceFileByPath ( path : Path ) : SourceFile | undefined {
11871187 return filesByName . get ( path ) ;
11881188 }
11891189
Original file line number Diff line number Diff line change @@ -2466,8 +2466,8 @@ namespace ts {
24662466
24672467 export interface ScriptReferenceHost {
24682468 getCompilerOptions ( ) : CompilerOptions ;
2469- getSourceFile ( fileName : string ) : SourceFile ;
2470- getSourceFileByPath ( path : Path ) : SourceFile ;
2469+ getSourceFile ( fileName : string ) : SourceFile | undefined ;
2470+ getSourceFileByPath ( path : Path ) : SourceFile | undefined ;
24712471 getCurrentDirectory ( ) : string ;
24722472 }
24732473
Original file line number Diff line number Diff line change @@ -1609,8 +1609,8 @@ declare namespace ts {
16091609 }
16101610 interface ScriptReferenceHost {
16111611 getCompilerOptions ( ) : CompilerOptions ;
1612- getSourceFile ( fileName : string ) : SourceFile ;
1613- getSourceFileByPath ( path : Path ) : SourceFile ;
1612+ getSourceFile ( fileName : string ) : SourceFile | undefined ;
1613+ getSourceFileByPath ( path : Path ) : SourceFile | undefined ;
16141614 getCurrentDirectory ( ) : string ;
16151615 }
16161616 interface ParseConfigHost {
Original file line number Diff line number Diff line change @@ -1609,8 +1609,8 @@ declare namespace ts {
16091609 }
16101610 interface ScriptReferenceHost {
16111611 getCompilerOptions ( ) : CompilerOptions ;
1612- getSourceFile ( fileName : string ) : SourceFile ;
1613- getSourceFileByPath ( path : Path ) : SourceFile ;
1612+ getSourceFile ( fileName : string ) : SourceFile | undefined ;
1613+ getSourceFileByPath ( path : Path ) : SourceFile | undefined ;
16141614 getCurrentDirectory ( ) : string ;
16151615 }
16161616 interface ParseConfigHost {
You can’t perform that action at this time.
0 commit comments