type MatcherMethod = (selector: string) => boolean; type VendorMatcherMethods = { msMatchesSelector?: MatcherMethod; }; type _Element = Element & VendorMatcherMethods; declare function matches(selectors: S, elm: _Element): elm is HTMLElementTagNameMap[S]; declare function matches(selectors: S, elm: _Element): elm is SVGElementTagNameMap[S]; declare function matches(selectors: string, elm: _Element): boolean; declare function matches(selectors: string, elm: _Element): elm is E; export default matches;