import { VNode } from 'vue' ; export param { VNode [ ] | undefined } slot returns { string } export default function getSlotText ( slot ? ) { if ( Array . isArray ( slot ) ) { return slot . map ( node => { if ( Array . isArray ( node . children ) && node . children . length > 0 ) { return getSlotText ( node . children ) ; } else { return node . text ; } } ) . join ( '' ) ; } else { return '' ; } }