export interface PresenceDetail { i : number ; } export type PresenceHandler = ( el : HTMLElement , detail : PresenceDetail ) => Promise < Animation | void > ; export const createPresenceHandler = ( cb ) => ( { detail : { hold , ... detail } , } ) => hold ( ( el ) => cb ( el , detail as PresenceDetail ) ) ;