parse.d.ts 751 B

1234567891011121314151617181920
  1. import { Selector, Traversal } from "./types";
  2. /**
  3. * Checks whether a specific selector is a traversal.
  4. * This is useful eg. in swapping the order of elements that
  5. * are not traversals.
  6. *
  7. * @param selector Selector to check.
  8. */
  9. export declare function isTraversal(selector: Selector): selector is Traversal;
  10. /**
  11. * Parses `selector`, optionally with the passed `options`.
  12. *
  13. * @param selector Selector to parse.
  14. * @param options Options for parsing.
  15. * @returns Returns a two-dimensional array.
  16. * The first dimension represents selectors separated by commas (eg. `sub1, sub2`),
  17. * the second contains the relevant tokens for that selector.
  18. */
  19. export declare function parse(selector: string): Selector[][];
  20. //# sourceMappingURL=parse.d.ts.map