docs/libs/typescript.js
function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) {
            var members = ts.createMap();
            var hasComputedProperties = false;
            ts.forEach(pattern.elements, function (e) {
                var name = e.propertyName || e.name;
                if (isComputedNonLiteralName(name)) {
                    // do not include computed properties in the implied type
                    hasComputedProperties = true;
                    return;
                }
                var text = getTextOfPropertyName(name);
                var flags = 4 /* Property */ | 67108864 /* Transient */ | (e.initializer ? 536870912 /* Optional */ : 0);
                var symbol = createSymbol(flags, text);
                symbol.type = getTypeFromBindingElement(e, includePatternInType, reportErrors);
                symbol.bindingElement = e;
                members[symbol.name] = symbol;
            });
            var result = createAnonymousType(undefined, members, emptyArray, emptyArray, undefined, undefined);
            if (includePatternInType) {
                result.pattern = pattern;
            }
            if (hasComputedProperties) {
                result.flags |= 536870912 /* ObjectLiteralPatternWithComputedProperties */;
            }
            return result;
        }
function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) {
            var members = ts.createMap();
            var hasComputedProperties = false;
            ts.forEach(pattern.elements, function (e) {
                var name = e.propertyName || e.name;
                if (isComputedNonLiteralName(name)) {
                    // do not include computed properties in the implied type
                    hasComputedProperties = true;
                    return;
                }
                var text = getTextOfPropertyName(name);
                var flags = 4 /* Property */ | 67108864 /* Transient */ | (e.initializer ? 536870912 /* Optional */ : 0);
                var symbol = createSymbol(flags, text);
                symbol.type = getTypeFromBindingElement(e, includePatternInType, reportErrors);
                symbol.bindingElement = e;
                members[symbol.name] = symbol;
            });
            var result = createAnonymousType(undefined, members, emptyArray, emptyArray, undefined, undefined);
            if (includePatternInType) {
                result.pattern = pattern;
            }
            if (hasComputedProperties) {
                result.flags |= 536870912 /* ObjectLiteralPatternWithComputedProperties */;
            }
            return result;
        }
function getTypeFromObjectBindingPattern ( pattern , includePatternInType , reportErrors ) { var members = ts . createMap ( ) ; var hasComputedProperties = false ; ts . forEach ( pattern . elements , function ( e ) { var name = e . propertyName || e . name ; if ( isComputedNonLiteralName ( name ) ) { // do not include computed properties in the implied type hasComputedProperties = true ; return ; } var text = getTextOfPropertyName ( name ) ; var flags = 4 /* Property */ | 67108864 /* Transient */ | ( e . initializer ? 536870912 /* Optional */ : 0 ) ; var symbol = createSymbol ( flags , text ) ; symbol . type = getTypeFromBindingElement ( e , includePatternInType , reportErrors ) ; symbol . bindingElement = e ; members [ symbol . name ] = symbol ; } ) ; var result = createAnonymousType ( undefined , members , emptyArray , emptyArray , undefined , undefined ) ; if ( includePatternInType ) { result . pattern = pattern ; } if ( hasComputedProperties ) { result . flags |= 536870912 /* ObjectLiteralPatternWithComputedProperties */ ; } return result ; }
Return the type implied by an object binding pattern
Return the type implied by an object binding pattern