mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-14 18:39:19 -05:00
Merge pull request #1395 from Microsoft/dev_mode
Add 'dev mode' to the language service
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user