mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
readFile may return undefined
This commit is contained in:
@@ -209,7 +209,7 @@ namespace Utils {
|
||||
}
|
||||
}
|
||||
|
||||
readFile(path: string): string {
|
||||
readFile(path: string): string | undefined {
|
||||
const value = this.traversePath(path);
|
||||
if (value && value.isFile()) {
|
||||
return value.content.content;
|
||||
|
||||
Reference in New Issue
Block a user