class Project: implement log and error from LanguageServiceHost (#21635)

* class Project: implement `log` and `error` from `LanguageServiceHost`

* Update API baseline
This commit is contained in:
Andy
2018-02-05 11:42:03 -08:00
committed by GitHub
parent c1a2adcea4
commit d11c7aeeaf
2 changed files with 10 additions and 0 deletions

View File

@@ -428,6 +428,14 @@ namespace ts.server {
this.projectService.logger.info(s);
}
log(s: string) {
this.writeLog(s);
}
error(s: string) {
this.projectService.logger.msg(s, Msg.Err);
}
private setInternalCompilerOptionsForEmittingJsFiles() {
if (this.projectKind === ProjectKind.Inferred || this.projectKind === ProjectKind.External) {
this.compilerOptions.noEmitForJsFiles = true;

View File

@@ -7500,6 +7500,8 @@ declare namespace ts.server {
resolveTypeReferenceDirectives(typeDirectiveNames: string[], containingFile: string): ResolvedTypeReferenceDirective[];
directoryExists(path: string): boolean;
getDirectories(path: string): string[];
log(s: string): void;
error(s: string): void;
private setInternalCompilerOptionsForEmittingJsFiles();
/**
* Get the errors that dont have any file name associated