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": "TSUnionType", 14 "types": [ 15 { 16 "type": "TSArrayType", 17 "elementType": { 18 "type": "TSNumberKeyword", 19 "loc": { 20 "start": { 21 "line": 17, 22 "column": 8 23 }, 24 "end": { 25 "line": 17, 26 "column": 14 27 } 28 } 29 }, 30 "loc": { 31 "start": { 32 "line": 17, 33 "column": 8 34 }, 35 "end": { 36 "line": 17, 37 "column": 16 38 } 39 } 40 }, 41 { 42 "type": "TSTupleType", 43 "elementTypes": [ 44 { 45 "type": "TSStringKeyword", 46 "loc": { 47 "start": { 48 "line": 17, 49 "column": 20 50 }, 51 "end": { 52 "line": 17, 53 "column": 27 54 } 55 } 56 }, 57 { 58 "type": "TSNumberKeyword", 59 "loc": { 60 "start": { 61 "line": 17, 62 "column": 28 63 }, 64 "end": { 65 "line": 17, 66 "column": 35 67 } 68 } 69 } 70 ], 71 "loc": { 72 "start": { 73 "line": 17, 74 "column": 19 75 }, 76 "end": { 77 "line": 17, 78 "column": 35 79 } 80 } 81 } 82 ], 83 "loc": { 84 "start": { 85 "line": 17, 86 "column": 8 87 }, 88 "end": { 89 "line": 17, 90 "column": 35 91 } 92 } 93 }, 94 "decorators": [], 95 "loc": { 96 "start": { 97 "line": 17, 98 "column": 5 99 }, 100 "end": { 101 "line": 17, 102 "column": 6 103 } 104 } 105 }, 106 "init": { 107 "type": "ArrayExpression", 108 "elements": [ 109 { 110 "type": "BooleanLiteral", 111 "value": true, 112 "loc": { 113 "start": { 114 "line": 17, 115 "column": 39 116 }, 117 "end": { 118 "line": 17, 119 "column": 43 120 } 121 } 122 }, 123 { 124 "type": "NumberLiteral", 125 "value": 5, 126 "loc": { 127 "start": { 128 "line": 17, 129 "column": 45 130 }, 131 "end": { 132 "line": 17, 133 "column": 46 134 } 135 } 136 } 137 ], 138 "loc": { 139 "start": { 140 "line": 17, 141 "column": 38 142 }, 143 "end": { 144 "line": 17, 145 "column": 47 146 } 147 } 148 }, 149 "loc": { 150 "start": { 151 "line": 17, 152 "column": 5 153 }, 154 "end": { 155 "line": 17, 156 "column": 47 157 } 158 } 159 } 160 ], 161 "kind": "var", 162 "loc": { 163 "start": { 164 "line": 17, 165 "column": 1 166 }, 167 "end": { 168 "line": 17, 169 "column": 48 170 } 171 } 172 } 173 ], 174 "loc": { 175 "start": { 176 "line": 1, 177 "column": 1 178 }, 179 "end": { 180 "line": 17, 181 "column": 48 182 } 183 } 184} 185TypeError: Type 'boolean' is not assignable to type 'number | string'. [tupleAssignability20.ts:17:39] 186