Skip to content

Commit df27316

Browse files
merlinnotthechenky
authored andcommitted
Improve types of the Change class (#403)
Both `before` and `after` fields are now described as non-optional.
1 parent 1dd2035 commit df27316

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fixed - improved types of the `Change` class to describe both `before` and `after` fields as non-optional

src/cloud-functions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export interface EventContext {
9090
* to the event, "after" represents the state after the event.
9191
*/
9292
export class Change<T> {
93-
constructor(public before?: T, public after?: T) {}
93+
constructor(public before: T, public after: T) {}
9494
}
9595

9696
/** ChangeJson is the JSON format used to construct a Change object. */

0 commit comments

Comments
 (0)