function getPossibleTypes(parsedSelector){switch(parsedSelector.type){case"identifier":return[parsedSelector.value];case"matches":{var typesForComponents=parsedSelector.selectors.map(getPossibleTypes);if(typesForComponents.every(function(typesForComponent){return typesForComponent;})){return lodash.union.apply(null,typesForComponents);}return null;}case"compound":{var _typesForComponents=parsedSelector.selectors.map(getPossibleTypes).filter(function(typesForComponent){return typesForComponent;});// If all of the components could match any type, then the compound could also match any type.
if(!_typesForComponents.length){return null;}/*
                 * If at least one of the components could only match a particular type, the compound could only match
                 * the intersection of those types.
                 */return lodash.intersection.apply(null,_typesForComponents);}case"child":case"descendant":case"sibling":case"adjacent":return getPossibleTypes(parsedSelector.right);default:return null;}}
Gets the possible types of a selector
@param {Object} parsedSelector An object (from esquery) describing the matching behavior of the selector
@returns {string[]|null} The node types that could possibly trigger this selector, or `null` if all node types could trigger it