TypeScript/tests/baselines/reference/invalidTryStatements.errors.txt
2014-07-12 17:30:19 -07:00

20 lines
648 B
Plaintext

==== tests/cases/conformance/statements/tryStatements/invalidTryStatements.ts (3 errors) ====
function fn() {
try {
} catch (x) {
var x: string; // ensure x is 'Any'
}
// no type annotation allowed
try { } catch (z: any) { }
~
!!! Catch clause parameter cannot have a type annotation.
try { } catch (a: number) { }
~
!!! Catch clause parameter cannot have a type annotation.
try { } catch (y: string) { }
~
!!! Catch clause parameter cannot have a type annotation.
}