Skip to content

Commit a16a955

Browse files
committed
Wrap getDefaultLibFileName API changes in a try/catch until TypeScript 1.5 has shipped.
1 parent 545e8f4 commit a16a955

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/services/shims.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,14 @@ module ts {
274274
}
275275

276276
public getDefaultLibFileName(options: CompilerOptions): string {
277-
return this.shimHost.getDefaultLibFileName(JSON.stringify(options));
277+
// Wrap the API changes for 1.5 release. This try/catch
278+
// should be removed once TypeScript 1.5 has shipped.
279+
try {
280+
return this.shimHost.getDefaultLibFileName(JSON.stringify(options));
281+
}
282+
catch (e) {
283+
return "";
284+
}
278285
}
279286
}
280287

0 commit comments

Comments
 (0)