@firebase/database-types
- Version 1.0.5
- Published
- 6.26 kB
- 2 dependencies
- Apache-2.0 license
Install
npm i @firebase/database-types
yarn add @firebase/database-types
pnpm add @firebase/database-types
Overview
@firebase/database Types
Index
Functions
Classes
Interfaces
Type Aliases
Functions
function enableLogging
enableLogging: ( logger?: boolean | ((a: string) => any), persistent?: boolean) => any;
Classes
class FirebaseDatabase
class FirebaseDatabase implements Database {}
property app
app: FirebaseApp;
method goOffline
goOffline: () => void;
method goOnline
goOnline: () => void;
method ref
ref: (path?: string | Reference) => Reference;
method refFromURL
refFromURL: (url: string) => Reference;
method useEmulator
useEmulator: ( host: string, port: number, options?: { mockUserToken?: EmulatorMockTokenOptions | string }) => void;
Interfaces
interface Database
interface Database {}
property app
app: FirebaseApp;
method goOffline
goOffline: () => void;
method goOnline
goOnline: () => void;
method ref
ref: (path?: string | Reference) => Reference;
method refFromURL
refFromURL: (url: string) => Reference;
method useEmulator
useEmulator: ( host: string, port: number, options?: { mockUserToken?: EmulatorMockTokenOptions | string }) => void;
interface DataSnapshot
interface DataSnapshot {}
property key
key: string | null;
property ref
ref: Reference;
method child
child: (path: string) => DataSnapshot;
method exists
exists: () => boolean;
method exportVal
exportVal: () => any;
method forEach
forEach: (action: (a: IteratedDataSnapshot) => boolean | void) => boolean;
method getPriority
getPriority: () => string | number | null;
method hasChild
hasChild: (path: string) => boolean;
method hasChildren
hasChildren: () => boolean;
method numChildren
numChildren: () => number;
method toJSON
toJSON: () => Object | null;
method val
val: () => any;
interface IteratedDataSnapshot
interface IteratedDataSnapshot extends DataSnapshot {}
Represents a child snapshot of a
Reference
that is being iterated over. The key will never be undefined.
property key
key: string;
interface OnDisconnect
interface OnDisconnect {}
method cancel
cancel: (onComplete?: (a: Error | null) => any) => Promise<void>;
method remove
remove: (onComplete?: (a: Error | null) => any) => Promise<void>;
method set
set: (value: any, onComplete?: (a: Error | null) => any) => Promise<void>;
method setWithPriority
setWithPriority: ( value: any, priority: number | string | null, onComplete?: (a: Error | null) => any) => Promise<any>;
method update
update: (values: Object, onComplete?: (a: Error | null) => any) => Promise<any>;
interface Query
interface Query {}
property ref
ref: Reference;
method endAt
endAt: (value: number | string | boolean | null, key?: string) => Query;
method endBefore
endBefore: (value: number | string | boolean | null, key?: string) => Query;
method equalTo
equalTo: (value: number | string | boolean | null, key?: string) => Query;
method get
get: () => Promise<DataSnapshot>;
method isEqual
isEqual: (other: Query | null) => boolean;
method limitToFirst
limitToFirst: (limit: number) => Query;
method limitToLast
limitToLast: (limit: number) => Query;
method off
off: ( eventType?: EventType, callback?: (a: DataSnapshot, b?: string | null) => any, context?: Object | null) => void;
method on
on: ( eventType: EventType, callback: (a: DataSnapshot, b?: string | null) => any, cancelCallbackOrContext?: Object | ((a: Error) => any), context?: Object | null) => (a: DataSnapshot | null, b?: string | null) => any;
method once
once: ( eventType: EventType, successCallback?: (a: DataSnapshot, b?: string | null) => any, failureCallbackOrContext?: Object | ((a: Error) => void), context?: Object | null) => Promise<DataSnapshot>;
method orderByChild
orderByChild: (path: string) => Query;
method orderByKey
orderByKey: () => Query;
method orderByPriority
orderByPriority: () => Query;
method orderByValue
orderByValue: () => Query;
method startAfter
startAfter: (value: number | string | boolean | null, key?: string) => Query;
method startAt
startAt: (value: number | string | boolean | null, key?: string) => Query;
method toJSON
toJSON: () => Object;
method toString
toString: () => string;
interface Reference
interface Reference extends Query {}
property key
key: string | null;
property parent
parent: Reference | null;
property root
root: Reference;
method child
child: (path: string) => Reference;
method onDisconnect
onDisconnect: () => OnDisconnect;
method push
push: (value?: any, onComplete?: (a: Error | null) => any) => ThenableReference;
method remove
remove: (onComplete?: (a: Error | null) => void) => Promise<void>;
method set
set: (value: any, onComplete?: (a: Error | null) => void) => Promise<void>;
method setPriority
setPriority: ( priority: string | number | null, onComplete: (a: Error | null) => void) => Promise<void>;
method setWithPriority
setWithPriority: ( newVal: any, newPriority: string | number | null, onComplete?: (a: Error | null) => void) => Promise<void>;
method transaction
transaction: ( transactionUpdate: (a: any) => any, onComplete?: (a: Error | null, b: boolean, c: DataSnapshot | null) => void, applyLocally?: boolean) => Promise<TransactionResult>;
method update
update: ( values: Object, onComplete?: (a: Error | null) => void) => Promise<void>;
interface ServerValue
interface ServerValue {}
interface ThenableReference
interface ThenableReference extends Reference, Pick<Promise<Reference>, 'then' | 'catch'> {}
interface TransactionResult
interface TransactionResult {}
Type Aliases
type EventType
type EventType = | 'value' | 'child_added' | 'child_changed' | 'child_moved' | 'child_removed';
Package Files (1)
Dependencies (2)
Dev Dependencies (1)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@firebase/database-types
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@firebase/database-types)
- HTML<a href="https://www.jsdocs.io/package/@firebase/database-types"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3750 ms. - Missing or incorrect documentation? Open an issue for this package.