mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
readFile may return undefined
This commit is contained in:
@@ -217,7 +217,7 @@ namespace ts.server {
|
||||
return !this.project.isWatchedMissingFile(path) && this.host.fileExists(file);
|
||||
}
|
||||
|
||||
readFile(fileName: string): string {
|
||||
readFile(fileName: string): string | undefined {
|
||||
return this.host.readFile(fileName);
|
||||
}
|
||||
|
||||
|
||||
@@ -93,10 +93,10 @@ namespace ts.server.typingsInstaller {
|
||||
abstract readonly typesRegistry: Map<void>;
|
||||
|
||||
constructor(
|
||||
readonly installTypingHost: InstallTypingHost,
|
||||
readonly globalCachePath: string,
|
||||
readonly safeListPath: Path,
|
||||
readonly throttleLimit: number,
|
||||
protected readonly installTypingHost: InstallTypingHost,
|
||||
private readonly globalCachePath: string,
|
||||
private readonly safeListPath: Path,
|
||||
private readonly throttleLimit: number,
|
||||
protected readonly log = nullLog) {
|
||||
if (this.log.isEnabled()) {
|
||||
this.log.writeLine(`Global cache location '${globalCachePath}', safe file path '${safeListPath}'`);
|
||||
|
||||
Reference in New Issue
Block a user