I expect to be able to use the insertAfter method on any node, whether it's exported or not. However, this method throws an error if you try to call it on an exported interface declaration:
{ type: ExportNamedDeclaration, start: 65, end: 128, loc: [object Object], exportKind: type, specifiers: , source: null, declaration: [object Object], leadingComments: [object Object], comments: [object Object] } does not match type array
Repro example in AST Explorer: https://astexplorer.net/#/gist/5e9b2c94baf7845deef8a2b7f7062dc3/5b04592aa86629faf848fb85d945bdcfabd52014
(The AST Explorer is using an old version of jscodeshift, but this issue also repros on version 17.3.0)
I don't think this is expected behavior; at least, it's unclear to me what I can do on my end to resolve the issue. Any workaround for this would be welcome.