From d0fd964b694997d7d67849f3ff822b599cd057ab Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 22 Sep 2017 19:54:20 +0100 Subject: [PATCH] Fix getSourceFile return type (#18689) --- src/compiler/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 5347d7caaf..4e5ca9f07e 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -4095,8 +4095,8 @@ namespace ts { } export interface CompilerHost extends ModuleResolutionHost { - getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; - getSourceFileByPath?(fileName: string, path: Path, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; + getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile | undefined; + getSourceFileByPath?(fileName: string, path: Path, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile | undefined; getCancellationToken?(): CancellationToken; getDefaultLibFileName(options: CompilerOptions): string; getDefaultLibLocation?(): string;