index.d.ts 765 B

123456789101112131415161718192021222324
  1. // Generated by typings
  2. // Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/master/estraverse/estraverse.d.ts
  3. // Type definitions for estraverse
  4. // Project: https://github.com/estools/estraverse
  5. // Definitions by: Sanex3339 <https://github.com/sanex3339>
  6. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
  7. declare module 'estraverse' {
  8. export interface Visitor {
  9. enter?: (node: any, parentNode: any) => any;
  10. leave?: (node: any, parentNode: any) => any;
  11. fallback?: string;
  12. keys?: {};
  13. }
  14. export enum VisitorOption {
  15. Skip, Break, Remove
  16. }
  17. export function traverse (ast: any, visitor: Visitor): any;
  18. export function replace (ast: any, visitor: Visitor): any;
  19. }