@univerjs/core v0.4.2 • Docs
Function: fromCallback()
function fromCallback<T>(callback): Observable<T>
Creates an observable from a callback function.
Type Parameters
Type Parameter |
---|
T extends readonly unknown [] |
Parameters
Parameter | Type | Description |
---|---|---|
callback | CallbackFn <T > | The callback function that will be called when the observable is subscribed to. Please not that the if the callback function has this context, it will be lost when the callback is called. So you probably should bind the callback to the correct context. |
Returns
Observable
<T
>
The observable that will emit when the callback function gets called.
Defined in
submodules/univer/packages/core/src/shared/rxjs.ts:32 (opens in a new tab)