import { ImportDeclaration , Statement , cloneDeep } from "@babel/types" ; import { ToString } from "typedraft" ; import { NodePath } from "@babel/core" ; export function TranslateImport ( statements ) { const translated = [ ] ; statements . forEach ( each => { const node = each . node ; const import_from = node . source . value ; if ( import_from . includes ( "svelte-types" ) ) { return ; } translated . push ( node ) ; } ) ; return translated . map ( each => `${ ToString ( each , { comments : false } ) }` ) . join ( "\n" ) ; }