Change class Stay organized with collections Save and categorize content based on your preferences.
The Cloud Functions interface for events that change state, such as Realtime Database or Cloud FirestoreonWrite andonUpdate events.
For more information about the format used to constructChange objects, see below.
Signature:
exportdeclareclassChange<T>Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(before, after) | Constructs a new instance of theChange class |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| after | T | ||
| before | T |
Methods
| Method | Modifiers | Description |
|---|---|---|
| fromJSON(json, customizer) | static | Factory method for creating aChange from JSON and an optional customizer function to be applied to both thebefore and theafter fields. |
| fromObjects(before, after) | static | Factory method for creating aChange from abefore object and anafter object. |
Change.(constructor)
Constructs a new instance of theChange class
Signature:
constructor(before:T,after:T);Parameters
| Parameter | Type | Description |
|---|---|---|
| before | T | |
| after | T |
Change.after
Signature:
after:T;Change.before
Signature:
before:T;Change.fromJSON()
Factory method for creating aChange from JSON and an optional customizer function to be applied to both thebefore and theafter fields.
Signature:
staticfromJSON<T>(json:ChangeJson,customizer?:(x:any)=>T):Change<T>;Parameters
| Parameter | Type | Description |
|---|---|---|
| json | ChangeJson | |
| customizer | (x: any) => T |
Returns:
Change<T>
Change.fromObjects()
Factory method for creating aChange from abefore object and anafter object.
Signature:
staticfromObjects<T>(before:T,after:T):Change<T>;Parameters
| Parameter | Type | Description |
|---|---|---|
| before | T | |
| after | T |
Returns:
Change<T>
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-11-21 UTC.