Skip to content

Commit d0fd964

Browse files
filipesilvamhegazy
authored andcommitted
Fix getSourceFile return type (#18689)
1 parent 2399bac commit d0fd964

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4095,8 +4095,8 @@ namespace ts {
40954095
}
40964096

40974097
export interface CompilerHost extends ModuleResolutionHost {
4098-
getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile;
4099-
getSourceFileByPath?(fileName: string, path: Path, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile;
4098+
getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile | undefined;
4099+
getSourceFileByPath?(fileName: string, path: Path, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile | undefined;
41004100
getCancellationToken?(): CancellationToken;
41014101
getDefaultLibFileName(options: CompilerOptions): string;
41024102
getDefaultLibLocation?(): string;

0 commit comments

Comments
 (0)