diff --git a/src/services/services.ts b/src/services/services.ts index 31ba819df29..74e7f924a20 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -14,6 +14,9 @@ /// module ts { + + export var servicesVersion = "0.4" + export interface Node { getSourceFile(): SourceFile; getChildCount(sourceFile?: SourceFile): number; @@ -879,6 +882,8 @@ module ts { export interface Logger { log(s: string): void; + trace(s: string): void; + error(s: string): void; } // diff --git a/src/services/shims.ts b/src/services/shims.ts index 5556743830f..d139381c225 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -341,6 +341,14 @@ module ts { this.shimHost.log(s); } + public trace(s: string): void { + this.shimHost.trace(s); + } + + public error(s: string): void { + this.shimHost.error(s); + } + public getCompilationSettings(): CompilerOptions { var settingsJson = this.shimHost.getCompilationSettings(); if (settingsJson == null || settingsJson == "") { @@ -859,6 +867,13 @@ module ts { private _shims: Shim[] = []; private documentRegistry: DocumentRegistry = createDocumentRegistry(); + /* + * Returns script API version. + */ + public getServicesVersion(): string { + return servicesVersion; + } + public createLanguageServiceShim(host: LanguageServiceShimHost): LanguageServiceShim { try { var hostAdapter = new LanguageServiceShimHostAdapter(host);