Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/services/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module ts {

export var servicesVersion = "0.5"
export var servicesVersion = "0.4"

export interface Node {
getSourceFile(): SourceFile;
Expand Down
17 changes: 15 additions & 2 deletions src/services/shims.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ module ts {
}

export class LanguageServiceShimHostAdapter implements LanguageServiceHost {
private files: string[];

constructor(private shimHost: LanguageServiceShimHost) {
}

Expand All @@ -230,10 +232,15 @@ module ts {

public getScriptFileNames(): string[] {
var encoded = this.shimHost.getScriptFileNames();
return JSON.parse(encoded);
return this.files = JSON.parse(encoded);
}

public getScriptSnapshot(fileName: string): IScriptSnapshot {
// Shim the API changes for 1.5 release. This should be removed once
// TypeScript 1.5 has shipped.
if (this.files && this.files.indexOf(fileName) < 0) {
return undefined;
}
var scriptSnapshot = this.shimHost.getScriptSnapshot(fileName);
return scriptSnapshot && new ScriptSnapshotShimAdapter(scriptSnapshot);
}
Expand Down Expand Up @@ -266,7 +273,10 @@ module ts {
}

public getDefaultLibFileName(options: CompilerOptions): string {
return this.shimHost.getDefaultLibFileName(JSON.stringify(options));
// Shim the API changes for 1.5 release. This should be removed once
// TypeScript 1.5 has shipped.
return "";
//return this.shimHost.getDefaultLibFileName(JSON.stringify(options));
}
}

Expand Down Expand Up @@ -662,6 +672,9 @@ module ts {
"getEmitOutput('" + fileName + "')",
() => {
var output = this.languageService.getEmitOutput(fileName);
// Shim the API changes for 1.5 release. This should be removed once
// TypeScript 1.5 has shipped.
(<any>output).emitOutputStatus = output.emitSkipped ? 1 : 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment this is to shim things temporarily.

return output;
});
}
Expand Down