Skip to content

v3.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 25 May 22:23
aea4d8f

Breaking Changes

  • All functions are now explicitly "curried" (#8)

    If you were previously doing:

    const visitors = {
      Function(node) {
        console.log(node);
      },
    };
    
    walk.simple(node, visitors, state);

    You should now do:

    const visitors = walk.simple({
      Function(node) {
        console.log(node);
      },
    });
    
    visitors(node, state);

    This helps by:

    1. Improving TypeScript support as inference works much better
    2. Making the caching we were doing of the walkers explicit, by letting you keep a copy of the resulting function.

New Features

  • Export types for visitor objects (#7)