mahler
Version:
A automated task composer and HTN based planner for building autonomous system agents
13 lines (12 loc) • 480 B
TypeScript
import type { Ref } from '../ref';
import type { Observer } from '../observable';
import type { Operation } from '../operation';
/**
* Communicates the changes performed by a function on an object
* reference to an observer.
*
* @param fn The function to execute
* @param observer The observer to notify of changes
* @returns an intrumented function
*/
export declare function observe<S, U = void>(fn: (r: Ref<S>) => U, observer: Observer<Operation<S>>): (r: Ref<S>) => U;