From e59dbb02175ec394a35c496201da71c90cd6a50a Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 5 Feb 2019 23:19:26 -0500 Subject: mostly working version, but confused about LayoutKeys needing to inquire value seemingly unecessarily --- src/fields/FieldUpdatedArgs.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/fields/FieldUpdatedArgs.ts (limited to 'src/fields') diff --git a/src/fields/FieldUpdatedArgs.ts b/src/fields/FieldUpdatedArgs.ts new file mode 100644 index 000000000..23ccf2a5a --- /dev/null +++ b/src/fields/FieldUpdatedArgs.ts @@ -0,0 +1,27 @@ +import { Field, Opt } from "./Field"; +import { Document } from "./Document"; +import { Key } from "./Key"; + +export enum FieldUpdatedAction { + Add, + Remove, + Replace, + Update +} + +export interface FieldUpdatedArgs { + field: Field; + action: FieldUpdatedAction; +} + +export interface DocumentUpdatedArgs { + field: Document; + key: Key; + + oldValue: Opt; + newValue: Opt; + + fieldArgs?: FieldUpdatedArgs; + + action: FieldUpdatedAction; +} -- cgit v1.2.3-70-g09d2