@firebase/database-types

  • Version 0.7.3
  • Published
  • 7.8 kB
  • 1 dependency
  • 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

function enableLogging

enableLogging: (
logger?: boolean | ((a: string) => any),
persistent?: boolean
) => any;

    Classes

    class FirebaseDatabase

    class FirebaseDatabase implements Database {}

      property app

      app: any;

        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) => 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) => 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: DataSnapshot) => 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 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) => any) => Promise<any>;

                                                                                                                              method set

                                                                                                                              set: (value: any, onComplete?: (a: Error | null) => any) => Promise<any>;

                                                                                                                                method setPriority

                                                                                                                                setPriority: (
                                                                                                                                priority: string | number | null,
                                                                                                                                onComplete: (a: Error | null) => any
                                                                                                                                ) => Promise<any>;

                                                                                                                                  method setWithPriority

                                                                                                                                  setWithPriority: (
                                                                                                                                  newVal: any,
                                                                                                                                  newPriority: string | number | null,
                                                                                                                                  onComplete?: (a: Error | null) => any
                                                                                                                                  ) => Promise<any>;

                                                                                                                                    method transaction

                                                                                                                                    transaction: (
                                                                                                                                    transactionUpdate: (a: any) => any,
                                                                                                                                    onComplete?: (a: Error | null, b: boolean, c: DataSnapshot | null) => any,
                                                                                                                                    applyLocally?: boolean
                                                                                                                                    ) => Promise<any>;

                                                                                                                                      method update

                                                                                                                                      update: (values: Object, onComplete?: (a: Error | null) => any) => Promise<any>;

                                                                                                                                        interface ServerValue

                                                                                                                                        interface ServerValue {}

                                                                                                                                          property TIMESTAMP

                                                                                                                                          TIMESTAMP: Object;

                                                                                                                                            method increment

                                                                                                                                            increment: (delta: number) => Object;

                                                                                                                                              interface ThenableReference

                                                                                                                                              interface ThenableReference
                                                                                                                                              extends Reference,
                                                                                                                                              Pick<Promise<Reference>, 'then' | 'catch'> {}

                                                                                                                                                Type Aliases

                                                                                                                                                type EventType

                                                                                                                                                type EventType =
                                                                                                                                                | 'value'
                                                                                                                                                | 'child_added'
                                                                                                                                                | 'child_changed'
                                                                                                                                                | 'child_moved'
                                                                                                                                                | 'child_removed';

                                                                                                                                                  Package Files (1)

                                                                                                                                                  Dependencies (1)

                                                                                                                                                  Dev Dependencies (1)

                                                                                                                                                  Peer Dependencies (0)

                                                                                                                                                  No peer dependencies.

                                                                                                                                                  Badge

                                                                                                                                                  To add a badge like this onejsDocs.io badgeto 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>