Skip to content

Commit 1de3bba

Browse files
committed
Merge branch 'update-types3' of https://github.com/ajafff/TypeScript into ajafff-update-types3
2 parents 9b36e11 + b75ccb1 commit 1de3bba

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/compiler/program.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

src/compiler/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

tests/baselines/reference/api/tsserverlibrary.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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 {

tests/baselines/reference/api/typescript.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)