v3.0.0
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:
- Improving TypeScript support as inference works much better
- 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)