(declaration, type)
| 79560 | return createTupleType(elementTypes, elementFlags, type.target.readonly); |
| 79561 | } |
| 79562 | function widenTypeInferredFromInitializer(declaration, type) { |
| 79563 | var widened = ts.getCombinedNodeFlags(declaration) & 2 /* NodeFlags.Const */ || ts.isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type); |
| 79564 | if (ts.isInJSFile(declaration)) { |
| 79565 | if (isEmptyLiteralType(widened)) { |
| 79566 | reportImplicitAny(declaration, anyType); |
| 79567 | return anyType; |
| 79568 | } |
| 79569 | else if (isEmptyArrayLiteralType(widened)) { |
| 79570 | reportImplicitAny(declaration, anyArrayType); |
| 79571 | return anyArrayType; |
| 79572 | } |
| 79573 | } |
| 79574 | return widened; |
| 79575 | } |
| 79576 | function isLiteralOfContextualType(candidateType, contextualType) { |
| 79577 | if (contextualType) { |
| 79578 | if (contextualType.flags & 3145728 /* TypeFlags.UnionOrIntersection */) { |
no test coverage detected
searching dependent graphs…