import { Child , MessageCallback } from "pym.js" ; import onPymMessage from "./onPymMessage" ; function onPymMessageOnce ( pym , messageType , callback ) { const dispose = onPymMessage ( pym , messageType , ( raw ) => { callback ( raw ) ; dispose ( ) ; } ) ; return dispose ; } export default onPymMessageOnce ;