import { PullBlock } from "./types" ; export const watchOnce = ( pullPattern , entityId , callback ) => { const watcher = ( before , after ) => { if ( callback ( before , after ) ) { window . roamAlphaAPI . data . removePullWatch ( pullPattern , entityId , watcher ) ; } } ; window . roamAlphaAPI . data . addPullWatch ( pullPattern , entityId , watcher ) ; } ;