mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-14 16:56:06 -05:00
Add test for catch variable explicitly typed as 'any'.
This commit is contained in:
@@ -18,6 +18,18 @@ catch (e) {
|
||||
e.stack?.toUpperCase();
|
||||
}
|
||||
if (typeof e === "number") {
|
||||
e.toExponential();
|
||||
e++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
// ...
|
||||
}
|
||||
catch (e: any) {
|
||||
// All are allowed.
|
||||
void e.toUpperCase();
|
||||
void e.toExponential();
|
||||
void e();
|
||||
}
|
||||
Reference in New Issue
Block a user