diff --git a/src/services/shims.ts b/src/services/shims.ts index 0195077290325..fc47ff95280e7 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -274,7 +274,14 @@ module ts { } public getDefaultLibFileName(options: CompilerOptions): string { - return this.shimHost.getDefaultLibFileName(JSON.stringify(options)); + // Wrap the API changes for 1.5 release. This try/catch + // should be removed once TypeScript 1.5 has shipped. + try { + return this.shimHost.getDefaultLibFileName(JSON.stringify(options)); + } + catch (e) { + return ""; + } } }