1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
=== tests/cases/compiler/destructureCatchClause.ts ===
// These are okay with useUnknownInCatchVariables=false, but not okay with useUnknownInCatchVariables=true.
try {} catch ({ x }) { x }
>x : Symbol(x, Decl(destructureCatchClause.ts, 1, 15))
>x : Symbol(x, Decl(destructureCatchClause.ts, 1, 15))
try {} catch ([ x ]) { x }
>x : Symbol(x, Decl(destructureCatchClause.ts, 2, 15))
>x : Symbol(x, Decl(destructureCatchClause.ts, 2, 15))
try {} catch ({ a: { x } }) { x }
>x : Symbol(x, Decl(destructureCatchClause.ts, 4, 20))
>x : Symbol(x, Decl(destructureCatchClause.ts, 4, 20))
try {} catch ({ a: [ x ] }) { x }
>x : Symbol(x, Decl(destructureCatchClause.ts, 5, 20))
>x : Symbol(x, Decl(destructureCatchClause.ts, 5, 20))
try {} catch ([{ x }]) { x }
>x : Symbol(x, Decl(destructureCatchClause.ts, 7, 16))
>x : Symbol(x, Decl(destructureCatchClause.ts, 7, 16))
try {} catch ([[ x ]]) { x }
>x : Symbol(x, Decl(destructureCatchClause.ts, 8, 16))
>x : Symbol(x, Decl(destructureCatchClause.ts, 8, 16))
try {} catch ({ a: { b: { c: { x }} }}) { x }
>x : Symbol(x, Decl(destructureCatchClause.ts, 10, 30))
>x : Symbol(x, Decl(destructureCatchClause.ts, 10, 30))
try {} catch ({ x }: any) { x }
>x : Symbol(x, Decl(destructureCatchClause.ts, 13, 15))
>x : Symbol(x, Decl(destructureCatchClause.ts, 13, 15))
try {} catch ([ x ]: any) { x }
>x : Symbol(x, Decl(destructureCatchClause.ts, 14, 15))
>x : Symbol(x, Decl(destructureCatchClause.ts, 14, 15))
try {} catch ({ a: { x } }: any) { x }
>x : Symbol(x, Decl(destructureCatchClause.ts, 16, 20))
>x : Symbol(x, Decl(destructureCatchClause.ts, 16, 20))
try {} catch ({ a: [ x ] }: any) { x }
>x : Symbol(x, Decl(destructureCatchClause.ts, 17, 20))
>x : Symbol(x, Decl(destructureCatchClause.ts, 17, 20))
try {} catch ([{ x }]: any) { x }
>x : Symbol(x, Decl(destructureCatchClause.ts, 19, 16))
>x : Symbol(x, Decl(destructureCatchClause.ts, 19, 16))
try {} catch ([[ x ]]: any) { x }
>x : Symbol(x, Decl(destructureCatchClause.ts, 20, 16))
>x : Symbol(x, Decl(destructureCatchClause.ts, 20, 16))
try {} catch ({ a: { b: { c: { x }} }}: any) { x }
>x : Symbol(x, Decl(destructureCatchClause.ts, 22, 30))
>x : Symbol(x, Decl(destructureCatchClause.ts, 22, 30))
try {} catch ({ x }: unknown) { x }
>x : Symbol(x, Decl(destructureCatchClause.ts, 25, 15))
>x : Symbol(x, Decl(destructureCatchClause.ts, 25, 15))
try {} catch ([ x ]: unknown) { x }
>x : Symbol(x, Decl(destructureCatchClause.ts, 26, 15))
>x : Symbol(x, Decl(destructureCatchClause.ts, 26, 15))
try {} catch ({ a: { x } }: unknown) { x }
>x : Symbol(x, Decl(destructureCatchClause.ts, 28, 20))
>x : Symbol(x, Decl(destructureCatchClause.ts, 28, 20))
try {} catch ({ a: [ x ] }: unknown) { x }
>x : Symbol(x, Decl(destructureCatchClause.ts, 29, 20))
>x : Symbol(x, Decl(destructureCatchClause.ts, 29, 20))
try {} catch ([{ x }]: unknown) { x }
>x : Symbol(x, Decl(destructureCatchClause.ts, 31, 16))
>x : Symbol(x, Decl(destructureCatchClause.ts, 31, 16))
try {} catch ([[ x ]]: unknown) { x }
>x : Symbol(x, Decl(destructureCatchClause.ts, 32, 16))
>x : Symbol(x, Decl(destructureCatchClause.ts, 32, 16))
try {} catch ({ a: { b: { c: { x }} }}: unknown) { x }
>x : Symbol(x, Decl(destructureCatchClause.ts, 34, 30))
>x : Symbol(x, Decl(destructureCatchClause.ts, 34, 30))
|