import * as Y from 'yjs' ; export function assertDocumentAttachment < T extends Y . AbstractType < any > > ( sharedType ) { if ( ! sharedType . doc ) { throw new Error ( "shared type isn't attached to a document" ) ; } }