Wrap getDefaultLibFileName API changes in a try/catch until TypeScript 1.5 has shipped.

This commit is contained in:
Jason Ramsay 2015-02-24 10:08:37 -08:00
parent 545e8f457e
commit a16a95536b

View file

@ -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 "";
}
}
}