import { Observable } from 'rxjs'; import { QueryConfigOptions } from './queryConfig'; import { Store } from './store'; import { ReturnTypes } from './types'; export declare class Query { protected store: Store; __store__: Store; constructor(store: Store); /** * Select a slice from the store * * @example * * this.query.select() * this.query.select(state => state.entities) * this.query.select('token'); * this.query.select(['name', 'email']) * this.query.select([state => state.name, state => state.age]) * */ select(key: K): Observable; select(project: (store: S) => R): Observable; select(stateKeys: K[]): Observable>; select any] | Array<(state: S) => any>>(selectorFns: R): Observable>; select(): Observable; /** * Select the loading state * * @example * * this.query.selectLoading().subscribe(isLoading => {}) */ selectLoading(): Observable; /** * Select the error state * * @example * * this.query.selectError().subscribe(error => {}) */ selectError(): Observable; /** * Get the store's value * * @example * * this.query.getValue() * */ getValue(): S; /** * Select the cache state * * @example * * this.query.selectHasCache().pipe( * switchMap(hasCache => { * return hasCache ? of() : http().pipe(res => store.set(res)) * }) * ) */ selectHasCache(): Observable; /** * Whether we've cached data * * @example * * this.query.getHasCache() * */ getHasCache(): boolean; get config(): QueryConfigOptions; }