UNPKG

reactfire

Version:
38 lines (37 loc) 2.29 kB
import { ObservableStatus } from '../useObservable'; import { AllParameters } from './getValue'; declare type RemoteConfig = import('firebase/app').default.remoteConfig.RemoteConfig; declare type RemoteConfigValue = import('firebase/app').default.remoteConfig.Value; /** * Accepts a key and optionally a Remote Config instance. Returns a * Remote Config Value. * * @param key The parameter key in Remote Config * @param remoteConfig Optional instance. If not provided ReactFire will either grab the default instance or lazy load. */ export declare function useRemoteConfigValue(key: string, remoteConfig?: RemoteConfig): ObservableStatus<RemoteConfigValue>; /** * Convience method similar to useRemoteConfigValue. Returns a `string` from a Remote Config parameter. * @param key The parameter key in Remote Config * @param remoteConfig Optional instance. If not provided ReactFire will either grab the default instance or lazy load. */ export declare function useRemoteConfigString(key: string, remoteConfig?: RemoteConfig): ObservableStatus<string>; /** * Convience method similar to useRemoteConfigValue. Returns a `number` from a Remote Config parameter. * @param key The parameter key in Remote Config * @param remoteConfig Optional instance. If not provided ReactFire will either grab the default instance or lazy load. */ export declare function useRemoteConfigNumber(key: string, remoteConfig?: RemoteConfig): ObservableStatus<number>; /** * Convience method similar to useRemoteConfigValue. Returns a `boolean` from a Remote Config parameter. * @param key The parameter key in Remote Config * @param remoteConfig Optional instance. If not provided ReactFire will either grab the default instance or lazy load. */ export declare function useRemoteConfigBoolean(key: string, remoteConfig?: RemoteConfig): ObservableStatus<boolean>; /** * Convience method similar to useRemoteConfigValue. Returns allRemote Config parameters. * @param key The parameter key in Remote Config * @param remoteConfig Optional instance. If not provided ReactFire will either grab the default instance or lazy load. */ export declare function useRemoteConfigAll(key: string, remoteConfig?: RemoteConfig): ObservableStatus<AllParameters>; export {};