Merge pull request #2122 from Microsoft/getDefaultLibFileNameFix

Wrap getDefaultLibFileName API changes in a try/catch until TypeScript 1...
This commit is contained in:
jramsay 2015-02-24 10:24:27 -08:00
commit 2e86eedfbc

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