Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DataSnapshotObservable<T>

Type parameters

  • T

Hierarchy

Implements

Index

Constructors

constructor

  • constructor

    Parameters

    • Optional subscribe: function

      the function that is called when the Observable is initially subscribed to. This function is given a Subscriber, to which new values can be nexted, or an error method can be called to raise an error, or complete can be called to notify of a successful completion.

    Returns DataSnapshotObservable

Properties

_isScalar

_isScalar: boolean

Protected operator

operator: Operator<any, ExtendedDataSnapshot>

Protected source

source: Observable<any>

Static create

create: Function

Creates a new cold Observable by calling the Observable constructor

static

true

owner

Observable

method

create

param

the subscriber function to be passed to the Observable constructor

returns

a new cold observable

Static if

if: create

Static throw

throw: create

Methods

Protected _subscribe

  • _subscribe(subscriber: Subscriber<any>): TeardownLogic
  • Parameters

    • subscriber: Subscriber<any>

    Returns TeardownLogic

Protected _trySubscribe

  • Parameters

    Returns TeardownLogic

child

children

entry

  • entry(): Observable<object>

exists

  • exists(): Observable<boolean>

exportVal

  • exportVal(): Observable<T>

forEach

  • forEach(next: function, PromiseCtor?: PromiseConstructor): Promise<void>
  • method

    forEach

    Parameters

    Returns Promise<void>

    a promise that either resolves on observable completion or rejects with the handled error

getPriority

  • getPriority(): Observable<number | string>

hasChild

  • hasChild(path: string): Observable<boolean>

hasChildren

  • hasChildren(): Observable<boolean>

key

  • key(): Observable<string>

keys

  • keys(): Observable<string[]>

lift

  • Creates a new Observable, with this Observable as the source, and the passed operator defined as the new observable's operator.

    method

    lift

    Type parameters

    • R

    Parameters

    • operator: Operator<ExtendedDataSnapshot, R>

      the operator defining the operation to take on the observable

    Returns Observable<R>

    a new observable with the Operator applied

list

  • list(): Observable<object[]>

numChildren

  • numChildren(): Observable<number>

prevKey

  • prevKey(): Observable<string>

subscribe

  • subscribe(): Subscription
  • subscribe(observer: PartialObserver<ExtendedDataSnapshot>): Subscription
  • subscribe(next?: function, error?: function, complete?: function): Subscription
  • Registers handlers for handling emitted values, error and completions from the observable, and executes the observable's subscriber function, which will take action to set up the underlying data stream

    method

    subscribe

    Returns Subscription

    a subscription reference to the registered handlers

  • Parameters

    Returns Subscription

  • Parameters

    • Optional next: function
    • Optional error: function
        • (error: any): void
        • Parameters

          • error: any

          Returns void

    • Optional complete: function
        • (): void
        • Returns void

    Returns Subscription

toValArray

  • toValArray(): Observable<T[keyof T][]>
  • This operator takes the result of .val() for all children of the snapshot and emits them as an array. Contents of source snapshot:

    {
     childA: { prop: 'Hello' },
     childB: { prop: 'World!' },
    }
    

    Result of operator:

    [
     { prop: 'Hello' },
     { prop: 'World!' },
    ]
    

    Returns Observable<T[keyof T][]>

val

  • val(): Observable<T>

values

  • values(): Observable<T[keyof T][]>

Generated using TypeDoc