export type Atom = { /**
     * Invoke this method to notify mobx that your atom has been used somehow.
     * Returns true if there is currently a reactive context.
     */ reportObserved ( implicitObserver ? ) : boolean ; /**
     * Invoke this method _after_ this method has changed to signal mobx that all its observers should invalidate.
     */ reportChanged ( ) : void ; } ; let customCreateAtom ; let customReaction ; let defaultReaction = ( func ) => func ( ) ; export function reaction ( func , effect ) { if ( customReaction ) { return customReaction ( func , effect ) ; } else { defaultReaction ( func ) ; return undefined ; } } export function createAtom ( _name , _onBecomeObservedHandler ? , _onBecomeUnobservedHandler ? ) { if ( customCreateAtom ) { return customCreateAtom . apply ( null , arguments as any ) ; } else { throw new Error ( "observable implementation not provided. Call enableReactiveBindings, enableVueBindings or enableMobxBindings." ) ; } } param mobx export function enableMobxBindings ( mobx ) { customCreateAtom = mobx . createAtom ; customReaction = undefined ; } param vue export function enableVueBindings ( vue ) { customCreateAtom = function ( name , obo ) { let id = 0 ; const data = vue . reactive ( { data : id } ) ; const atom = { reportObserved ( ) { return data . data as any as boolean ; } , reportChanged ( ) { data . data = ++ id ; } , } ; if ( obo ) { obo ( ) ; } return atom ; } ; customReaction = undefined ; } export function enableReactiveBindings ( reactive ) { customCreateAtom = function ( name , obo , obu ) { const atom = reactive . createAtom ( name ) ; if ( obo ) { obo ( ) ; } return atom ; } ; customReaction = ( func , effect ) => { return reactive . reaction ( func , effect , { fireImmediately : false } ) ; } ; }