function reportWideningErrorsInType(type) {
            var errorReported = false;
            if (type.flags & 16384 /* Union */) {
                for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
                    var t = _a[_i];
                    if (reportWideningErrorsInType(t)) {
                        errorReported = true;
                    }
                }
            }
            if (isArrayType(type)) {
                return reportWideningErrorsInType(type.typeArguments[0]);
            }
            if (isTupleType(type)) {
                for (var _b = 0, _c = type.elementTypes; _b < _c.length; _b++) {
                    var t = _c[_b];
                    if (reportWideningErrorsInType(t)) {
                        errorReported = true;
                    }
                }
            }
            if (type.flags & 524288 /* ObjectLiteral */) {
                for (var _d = 0, _e = getPropertiesOfObjectType(type); _d < _e.length; _d++) {
                    var p = _e[_d];
                    var t = getTypeOfSymbol(p);
                    if (t.flags & 2097152 /* ContainsUndefinedOrNull */) {
                        if (!reportWideningErrorsInType(t)) {
                            error(p.valueDeclaration, ts.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, p.name, typeToString(getWidenedType(t)));
                        }
                        errorReported = true;
                    }
                }
            }
            return errorReported;
        }
Reports implicit any errors that occur as a result of widening 'null' and 'undefined'
to 'any'. A call to reportWideningErrorsInType is normally accompanied by a call to
getWidenedType. But in some cases getWidenedType is called without reporting errors
(type argument inference is an example).

The return value indicates whether an error was in fact reported. The particular circumstances
are on a best effort basis. Currently, if the null or undefined that causes widening is inside
an object literal property (arbitrarily deeply), this function reports an error. If no error is
reported, reportImplicitAnyError is a suitable fallback to report a general error.