If you pass in the parent path, this gets a little easier:
```js
var fun = path.node;
namedTypes.Function.assert(fun);

if (fun.rest) {
    printed.push(concat(["...", print(path.get("rest"))]));
}
if (fun.defaults) {
    ...
}
```