docs/libs/typescript.js
function getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors) {
            var elements = pattern.elements;
            if (elements.length === 0 || elements[elements.length - 1].dotDotDotToken) {
                return languageVersion >= 2 /* ES6 */ ? createIterableType(anyType) : anyArrayType;
            }
            // If the pattern has at least one element, and no rest element, then it should imply a tuple type.
            var elementTypes = ts.map(elements, function (e) { return e.kind === 193 /* OmittedExpression */ ? anyType : getTypeFromBindingElement(e, includePatternInType, reportErrors); });
            var result = createTupleType(elementTypes);
            if (includePatternInType) {
                result = cloneTypeReference(result);
                result.pattern = pattern;
            }
            return result;
        }
function getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors) {
            var elements = pattern.elements;
            if (elements.length === 0 || elements[elements.length - 1].dotDotDotToken) {
                return languageVersion >= 2 /* ES6 */ ? createIterableType(anyType) : anyArrayType;
            }
            // If the pattern has at least one element, and no rest element, then it should imply a tuple type.
            var elementTypes = ts.map(elements, function (e) { return e.kind === 193 /* OmittedExpression */ ? anyType : getTypeFromBindingElement(e, includePatternInType, reportErrors); });
            var result = createTupleType(elementTypes);
            if (includePatternInType) {
                result = cloneTypeReference(result);
                result.pattern = pattern;
            }
            return result;
        }
function getTypeFromArrayBindingPattern ( pattern , includePatternInType , reportErrors ) { var elements = pattern . elements ; if ( elements . length === 0 || elements [ elements . length - 1 ] . dotDotDotToken ) { return languageVersion >= 2 /* ES6 */ ? createIterableType ( anyType ) : anyArrayType ; } // If the pattern has at least one element, and no rest element, then it should imply a tuple type. var elementTypes = ts . map ( elements , function ( e ) { return e . kind === 193 /* OmittedExpression */ ? anyType : getTypeFromBindingElement ( e , includePatternInType , reportErrors ) ; } ) ; var result = createTupleType ( elementTypes ) ; if ( includePatternInType ) { result = cloneTypeReference ( result ) ; result . pattern = pattern ; } return result ; }
Return the type implied by an array binding pattern
Return the type implied by an array binding pattern