import { types as t, NodePath } from '@babel/core'; export const isRootPath = ( path: | NodePath | NodePath | NodePath | NodePath | NodePath, ) => { if (t.isExportNamedDeclaration(path)) return true; if (t.isExportDefaultDeclaration(path)) return true; if (t.isProgram(path)) return true; return false; };