Merge pull request #1395 from Microsoft/dev_mode

Add 'dev mode' to the language service
This commit is contained in:
Vladimir Matveev
2014-12-10 14:34:23 -08:00
2 changed files with 20 additions and 0 deletions

View File

@@ -14,6 +14,9 @@
/// <reference path='formatting.ts' />
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;
}
//

View File

@@ -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);