1{ 2 "type": "Program", 3 "statements": [ 4 { 5 "type": "VariableDeclaration", 6 "declarations": [ 7 { 8 "type": "VariableDeclarator", 9 "id": { 10 "type": "Identifier", 11 "name": "a", 12 "typeAnnotation": { 13 "type": "TSTypeLiteral", 14 "members": [ 15 { 16 "type": "TSPropertySignature", 17 "computed": false, 18 "optional": false, 19 "readonly": false, 20 "key": { 21 "type": "Identifier", 22 "name": "b", 23 "decorators": [], 24 "loc": { 25 "start": { 26 "line": 17, 27 "column": 10 28 }, 29 "end": { 30 "line": 17, 31 "column": 11 32 } 33 } 34 }, 35 "typeAnnotation": { 36 "type": "TSNumberKeyword", 37 "loc": { 38 "start": { 39 "line": 17, 40 "column": 13 41 }, 42 "end": { 43 "line": 17, 44 "column": 19 45 } 46 } 47 }, 48 "loc": { 49 "start": { 50 "line": 17, 51 "column": 10 52 }, 53 "end": { 54 "line": 17, 55 "column": 21 56 } 57 } 58 } 59 ], 60 "loc": { 61 "start": { 62 "line": 17, 63 "column": 8 64 }, 65 "end": { 66 "line": 17, 67 "column": 21 68 } 69 } 70 }, 71 "decorators": [], 72 "loc": { 73 "start": { 74 "line": 17, 75 "column": 5 76 }, 77 "end": { 78 "line": 17, 79 "column": 6 80 } 81 } 82 }, 83 "init": { 84 "type": "ObjectExpression", 85 "properties": [ 86 { 87 "type": "Property", 88 "method": false, 89 "shorthand": false, 90 "computed": false, 91 "key": { 92 "type": "Identifier", 93 "name": "b", 94 "decorators": [], 95 "loc": { 96 "start": { 97 "line": 17, 98 "column": 26 99 }, 100 "end": { 101 "line": 17, 102 "column": 27 103 } 104 } 105 }, 106 "value": { 107 "type": "FunctionExpression", 108 "function": { 109 "type": "ScriptFunction", 110 "id": null, 111 "generator": false, 112 "async": false, 113 "expression": false, 114 "params": [], 115 "returnType": { 116 "type": "TSStringKeyword", 117 "loc": { 118 "start": { 119 "line": 17, 120 "column": 42 121 }, 122 "end": { 123 "line": 17, 124 "column": 48 125 } 126 } 127 }, 128 "body": { 129 "type": "BlockStatement", 130 "statements": [ 131 { 132 "type": "ReturnStatement", 133 "argument": { 134 "type": "StringLiteral", 135 "value": "foo", 136 "loc": { 137 "start": { 138 "line": 17, 139 "column": 58 140 }, 141 "end": { 142 "line": 17, 143 "column": 63 144 } 145 } 146 }, 147 "loc": { 148 "start": { 149 "line": 17, 150 "column": 51 151 }, 152 "end": { 153 "line": 17, 154 "column": 63 155 } 156 } 157 } 158 ], 159 "loc": { 160 "start": { 161 "line": 17, 162 "column": 49 163 }, 164 "end": { 165 "line": 17, 166 "column": 65 167 } 168 } 169 }, 170 "loc": { 171 "start": { 172 "line": 17, 173 "column": 29 174 }, 175 "end": { 176 "line": 17, 177 "column": 65 178 } 179 } 180 }, 181 "loc": { 182 "start": { 183 "line": 17, 184 "column": 29 185 }, 186 "end": { 187 "line": 17, 188 "column": 65 189 } 190 } 191 }, 192 "kind": "init", 193 "loc": { 194 "start": { 195 "line": 17, 196 "column": 26 197 }, 198 "end": { 199 "line": 17, 200 "column": 65 201 } 202 } 203 } 204 ], 205 "loc": { 206 "start": { 207 "line": 17, 208 "column": 24 209 }, 210 "end": { 211 "line": 17, 212 "column": 67 213 } 214 } 215 }, 216 "loc": { 217 "start": { 218 "line": 17, 219 "column": 5 220 }, 221 "end": { 222 "line": 17, 223 "column": 67 224 } 225 } 226 } 227 ], 228 "kind": "var", 229 "loc": { 230 "start": { 231 "line": 17, 232 "column": 1 233 }, 234 "end": { 235 "line": 17, 236 "column": 67 237 } 238 } 239 } 240 ], 241 "loc": { 242 "start": { 243 "line": 1, 244 "column": 1 245 }, 246 "end": { 247 "line": 18, 248 "column": 1 249 } 250 } 251} 252TypeError: Type '() => string' is not assignable to type 'number'. [objectLiteralAssignability4.ts:17:26] 253