60
61
export function derivedOpts<T>(
63
>
equalsFn?: EqualityComparer<T>;
64
>
onLastObserverRemoved?: (() => void);
65
>
},
66
>
computeFn: (reader: IReader) => T,
67
>
debugLocation = DebugLocation.ofCaller()
68
>
): IObservable<T> {
69
>
return new Derived(
70
>
new DebugNameData(options.owner, options.debugName, options.debugReferenceFn),
71
>
computeFn,
72
>
undefined,
73
>
options.onLastObserverRemoved,
74
>
options.equalsFn ?? strictEquals,
75
>
debugLocation
76
>
);
77
>
}
78
_setDerivedOpts(derivedOpts);
79