1{ 2 "type": "Program", 3 "statements": [ 4 { 5 "type": "VariableDeclaration", 6 "declarations": [ 7 { 8 "type": "VariableDeclarator", 9 "id": { 10 "type": "Identifier", 11 "name": "foo", 12 "typeAnnotation": { 13 "type": "TSConstructorType", 14 "params": [], 15 "returnType": { 16 "type": "TSBooleanKeyword", 17 "loc": { 18 "start": { 19 "line": 17, 20 "column": 20 21 }, 22 "end": { 23 "line": 17, 24 "column": 27 25 } 26 } 27 }, 28 "loc": { 29 "start": { 30 "line": 17, 31 "column": 10 32 }, 33 "end": { 34 "line": 17, 35 "column": 27 36 } 37 } 38 }, 39 "decorators": [], 40 "loc": { 41 "start": { 42 "line": 17, 43 "column": 5 44 }, 45 "end": { 46 "line": 17, 47 "column": 8 48 } 49 } 50 }, 51 "init": null, 52 "loc": { 53 "start": { 54 "line": 17, 55 "column": 5 56 }, 57 "end": { 58 "line": 17, 59 "column": 8 60 } 61 } 62 } 63 ], 64 "kind": "var", 65 "loc": { 66 "start": { 67 "line": 17, 68 "column": 1 69 }, 70 "end": { 71 "line": 17, 72 "column": 28 73 } 74 } 75 }, 76 { 77 "type": "VariableDeclaration", 78 "declarations": [ 79 { 80 "type": "VariableDeclarator", 81 "id": { 82 "type": "Identifier", 83 "name": "a", 84 "decorators": [], 85 "loc": { 86 "start": { 87 "line": 18, 88 "column": 5 89 }, 90 "end": { 91 "line": 18, 92 "column": 6 93 } 94 } 95 }, 96 "init": { 97 "type": "NewExpression", 98 "callee": { 99 "type": "Identifier", 100 "name": "foo", 101 "decorators": [], 102 "loc": { 103 "start": { 104 "line": 18, 105 "column": 13 106 }, 107 "end": { 108 "line": 18, 109 "column": 16 110 } 111 } 112 }, 113 "arguments": [], 114 "loc": { 115 "start": { 116 "line": 18, 117 "column": 9 118 }, 119 "end": { 120 "line": 18, 121 "column": 18 122 } 123 } 124 }, 125 "loc": { 126 "start": { 127 "line": 18, 128 "column": 5 129 }, 130 "end": { 131 "line": 18, 132 "column": 18 133 } 134 } 135 } 136 ], 137 "kind": "var", 138 "loc": { 139 "start": { 140 "line": 18, 141 "column": 1 142 }, 143 "end": { 144 "line": 18, 145 "column": 19 146 } 147 } 148 }, 149 { 150 "type": "ExpressionStatement", 151 "expression": { 152 "type": "AssignmentExpression", 153 "operator": "=", 154 "left": { 155 "type": "Identifier", 156 "name": "a", 157 "decorators": [], 158 "loc": { 159 "start": { 160 "line": 19, 161 "column": 1 162 }, 163 "end": { 164 "line": 19, 165 "column": 2 166 } 167 } 168 }, 169 "right": { 170 "type": "StringLiteral", 171 "value": "foo", 172 "loc": { 173 "start": { 174 "line": 19, 175 "column": 5 176 }, 177 "end": { 178 "line": 19, 179 "column": 10 180 } 181 } 182 }, 183 "loc": { 184 "start": { 185 "line": 19, 186 "column": 1 187 }, 188 "end": { 189 "line": 19, 190 "column": 10 191 } 192 } 193 }, 194 "loc": { 195 "start": { 196 "line": 19, 197 "column": 1 198 }, 199 "end": { 200 "line": 19, 201 "column": 11 202 } 203 } 204 } 205 ], 206 "loc": { 207 "start": { 208 "line": 1, 209 "column": 1 210 }, 211 "end": { 212 "line": 20, 213 "column": 1 214 } 215 } 216} 217TypeError: Type 'string' is not assignable to type 'boolean'. [new_expression_162.ts:19:1] 218