eslint-visitor-keys.d.cts 762 B

123456789101112131415161718192021222324252627
  1. type VisitorKeys$1 = {
  2. readonly [type: string]: ReadonlyArray<string>;
  3. };
  4. /**
  5. * @typedef {{ readonly [type: string]: ReadonlyArray<string> }} VisitorKeys
  6. */
  7. /**
  8. * @type {VisitorKeys}
  9. */
  10. declare const KEYS: VisitorKeys$1;
  11. /**
  12. * Get visitor keys of a given node.
  13. * @param {Object} node The AST node to get keys.
  14. * @returns {readonly string[]} Visitor keys of the node.
  15. */
  16. declare function getKeys(node: Object): readonly string[];
  17. /**
  18. * Make the union set with `KEYS` and given keys.
  19. * @param {VisitorKeys} additionalKeys The additional keys.
  20. * @returns {VisitorKeys} The union set.
  21. */
  22. declare function unionWith(additionalKeys: VisitorKeys): VisitorKeys;
  23. type VisitorKeys = VisitorKeys$1;
  24. export { KEYS, type VisitorKeys, getKeys, unionWith };