mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
30 lines
1.1 KiB
Plaintext
30 lines
1.1 KiB
Plaintext
duplicateIdentifierInCatchBlock.ts(6,10): error TS2300: Duplicate identifier 'w'.
|
|
duplicateIdentifierInCatchBlock.ts(8,9): error TS2300: Duplicate identifier 'w'.
|
|
duplicateIdentifierInCatchBlock.ts(16,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'string', but here has type 'number'.
|
|
|
|
|
|
==== duplicateIdentifierInCatchBlock.ts (3 errors) ====
|
|
var v;
|
|
try { } catch (e) {
|
|
function v() { }
|
|
}
|
|
|
|
function w() { }
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'w'.
|
|
try { } catch (e) {
|
|
var w;
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'w'.
|
|
}
|
|
|
|
try { } catch (e) {
|
|
var x;
|
|
function x() { } // error
|
|
function e() { } // error
|
|
var p: string;
|
|
var p: number; // error
|
|
~
|
|
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'string', but here has type 'number'.
|
|
!!! related TS6203 duplicateIdentifierInCatchBlock.ts:15:9: 'p' was also declared here.
|
|
} |