1{ 2 "type": "Program", 3 "statements": [ 4 { 5 "type": "ExpressionStatement", 6 "expression": { 7 "type": "AssignmentExpression", 8 "operator": "=", 9 "left": { 10 "type": "Identifier", 11 "name": "a", 12 "decorators": [], 13 "loc": { 14 "start": { 15 "line": 17, 16 "column": 1 17 }, 18 "end": { 19 "line": 17, 20 "column": 2 21 } 22 } 23 }, 24 "right": { 25 "type": "NumberLiteral", 26 "value": 2, 27 "loc": { 28 "start": { 29 "line": 17, 30 "column": 5 31 }, 32 "end": { 33 "line": 17, 34 "column": 6 35 } 36 } 37 }, 38 "loc": { 39 "start": { 40 "line": 17, 41 "column": 1 42 }, 43 "end": { 44 "line": 17, 45 "column": 6 46 } 47 } 48 }, 49 "loc": { 50 "start": { 51 "line": 17, 52 "column": 1 53 }, 54 "end": { 55 "line": 17, 56 "column": 7 57 } 58 } 59 }, 60 { 61 "type": "VariableDeclaration", 62 "declarations": [ 63 { 64 "type": "VariableDeclarator", 65 "id": { 66 "type": "Identifier", 67 "name": "a", 68 "typeAnnotation": { 69 "type": "TSNumberKeyword", 70 "loc": { 71 "start": { 72 "line": 18, 73 "column": 8 74 }, 75 "end": { 76 "line": 18, 77 "column": 14 78 } 79 } 80 }, 81 "decorators": [], 82 "loc": { 83 "start": { 84 "line": 18, 85 "column": 5 86 }, 87 "end": { 88 "line": 18, 89 "column": 6 90 } 91 } 92 }, 93 "init": null, 94 "loc": { 95 "start": { 96 "line": 18, 97 "column": 5 98 }, 99 "end": { 100 "line": 18, 101 "column": 6 102 } 103 } 104 } 105 ], 106 "kind": "let", 107 "loc": { 108 "start": { 109 "line": 18, 110 "column": 1 111 }, 112 "end": { 113 "line": 18, 114 "column": 15 115 } 116 } 117 } 118 ], 119 "loc": { 120 "start": { 121 "line": 1, 122 "column": 1 123 }, 124 "end": { 125 "line": 19, 126 "column": 1 127 } 128 } 129} 130TypeError: Block-scoped variable 'a' used before its declaration [letUsedBeforeDeclaration.ts:18:5] 131