demo/typescript.js
function getTypeFromBindingPattern(pattern, includePatternInType) {
            return pattern.kind === 161 /* ObjectBindingPattern */
                ? getTypeFromObjectBindingPattern(pattern, includePatternInType)
                : getTypeFromArrayBindingPattern(pattern, includePatternInType);
        }
function getTypeFromBindingPattern(pattern, includePatternInType) {
            return pattern.kind === 161 /* ObjectBindingPattern */
                ? getTypeFromObjectBindingPattern(pattern, includePatternInType)
                : getTypeFromArrayBindingPattern(pattern, includePatternInType);
        }
Return the type implied by a binding pattern. This is the type implied purely by the binding pattern itself and without regard to its context (i.e. without regard any type annotation or initializer associated with the declaration in which the binding pattern is contained). For example, the implied type of [x, y] is [any, any] and the implied type of { x, y: z = 1 } is { x: any; y: number; }. The type implied by a binding pattern is used as the contextual type of an initializer associated with the binding pattern. Also, for a destructuring parameter with no type annotation or initializer, the type implied by the binding pattern becomes the type of the parameter.