(node, source, target, relation, containingMessageChain, errorOutputContainer)
| 64246 | }); |
| 64247 | } |
| 64248 | function elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) { |
| 64249 | if (target.flags & 131068 /* TypeFlags.Primitive */) |
| 64250 | return false; |
| 64251 | if (isTupleLikeType(source)) { |
| 64252 | return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer); |
| 64253 | } |
| 64254 | // recreate a tuple from the elements, if possible |
| 64255 | // Since we're re-doing the expression type, we need to reapply the contextual type |
| 64256 | var oldContext = node.contextualType; |
| 64257 | node.contextualType = target; |
| 64258 | try { |
| 64259 | var tupleizedType = checkArrayLiteral(node, 1 /* CheckMode.Contextual */, /*forceTuple*/ true); |
| 64260 | node.contextualType = oldContext; |
| 64261 | if (isTupleLikeType(tupleizedType)) { |
| 64262 | return elaborateElementwise(generateLimitedTupleElements(node, target), tupleizedType, target, relation, containingMessageChain, errorOutputContainer); |
| 64263 | } |
| 64264 | return false; |
| 64265 | } |
| 64266 | finally { |
| 64267 | node.contextualType = oldContext; |
| 64268 | } |
| 64269 | } |
| 64270 | function generateObjectLiteralElements(node) { |
| 64271 | var _i, _a, prop, type, _b; |
| 64272 | return __generator(this, function (_c) { |
no test coverage detected