1.1.2 • Published 2 years ago

@craftworks/craftworks-library-rxjs v1.1.2

Weekly downloads
149
License
MIT
Repository
github
Last release
2 years ago

@craftworks/craftworks-library-rxjs

NPM version Downloads

A RxJS library used at craftworks

Installation

npm install --save @craftworks/craftworks-library-rxjs

peerDependencies

  • rxjs ^6.6.3 | ^7.0.0

API

/**
 * Logs the current value to the console on .next, .error and .complete
 *
 * @param {string} [tag] - A optional tag, if no tag is supplied a incrementing index is used
 */
function debug<T>(tag?: string | undefined): MonoTypeOperatorFunction<T>

/**
 * Sets the status of the loadingStore$ to true
 * Use this when loading should be started
 *
 * @param {Subject<boolean>} loadingStore$  - store to set `isLoading` state
 * @param {boolean} [omitError=false] - whether to set loadingStore and loadedStore when an error occurs, defaults to false
 */
function loadingStart<T>(loadingStore$: Subject<boolean>, omitError?: boolean): MonoTypeOperatorFunction<T>;

/**
 * Sets the status of the loadingStore$ to false
 * Use this when loading should be stopped
 *
 * @param {Subject<boolean>} loadingStore$  - store to set `isLoading` state
 * @param {Subject<boolean>} [loadedStore$] - optional store to set `hasLoaded` state
 * @param {boolean} [omitError=false] - whether to set loadingStore and loadedStore when an error occurs, defaults to false
 */
function loadingStop<T>(loadingStore$: Subject<boolean>, loadedStore$?: Subject<boolean>, omitError?: boolean): MonoTypeOperatorFunction<T>;

/**
 * Sets the status of the loadingStore$ to true via an imperative call
 * Use this when loading should be stopped in a imperative manner (e.g. before calling a observable)
 *
 * @param {Subject<boolean>} loadingStore$  - store to set `isLoading` state
 */
function loadingStartStatic(loadingStore$: Subject<boolean>): void;

/**
 * Sets the status of the loadingStore$ to false via an imperative call
 * Use this when loading should be stopped in a imperative manner (e.g. externally stopping)
 *
 * @param {Subject<boolean>} loadingStore$  - store to set `isLoading` state
 * @param {Subject<boolean>} [loadedStore$] - optional store to set `hasLoaded` state
 */
function loadingStopStatic(loadingStore$: Subject<boolean>, loadedStore$?: Subject<boolean>): void;
1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

3 years ago

1.0.0

4 years ago

0.0.2

5 years ago

0.0.1

5 years ago

0.0.0

5 years ago