entropic-bond 1.53.8 → 1.53.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,14 @@
1
1
  import { ClassPropNames, ClassPropNamesOfType, Primitive, SomeClassProps, UnderscoredProp } from '../types/utility-types';
2
2
  export type PersistentConstructor = new () => Persistent;
3
+ export type DocumentChangeType = 'create' | 'update' | 'delete';
4
+ export interface DocumentChange<T extends Persistent | PersistentObject<Persistent>> {
5
+ before?: T;
6
+ after?: T;
7
+ params?: {
8
+ [key: string]: any;
9
+ };
10
+ type: DocumentChangeType;
11
+ }
3
12
  /**
4
13
  * The corresponding type of the plain object of a persistent class.
5
14
  */
@@ -33,13 +42,6 @@ export interface DocumentReference {
33
42
  storedInCollection: string;
34
43
  };
35
44
  }
36
- export interface DocumentChange {
37
- before: Persistent | undefined;
38
- after: Persistent;
39
- params: {
40
- [key: string]: any;
41
- };
42
- }
43
45
  type PersistentPropertyCollection = {
44
46
  [className: string]: PersistentProperty[];
45
47
  };
@@ -208,7 +210,7 @@ export type OwnerCollectionResolver = (ownerClassName: string, params: {}) => st
208
210
  */
209
211
  export type CachedPropsConfig<T extends Persistent> = {
210
212
  cachedProps: ClassPropNamesOfType<T, Primitive>[];
211
- updater?: (event: DocumentChange, property: PersistentProperty) => Promise<void>;
213
+ updater?: (event: DocumentChange<T>, property: PersistentProperty) => Promise<void>;
212
214
  ownerCollectionResolver?: OwnerCollectionResolver;
213
215
  };
214
216
  export interface PersistentProperty {
@@ -1,4 +1,4 @@
1
- import { Persistent, PersistentObject, Collections, PersistentProperty } from '../persistent/persistent';
1
+ import { Persistent, PersistentObject, Collections, PersistentProperty, DocumentChange } from '../persistent/persistent';
2
2
  import { ClassPropNames } from '../types/utility-types';
3
3
  import { Unsubscriber } from '../observable/observable';
4
4
  export type DocumentObject = PersistentObject<Persistent>;
@@ -54,15 +54,6 @@ export type QueryObject<T> = {
54
54
  };
55
55
  };
56
56
  export type DocumentListenerUninstaller = () => void;
57
- export type DocumentChangeType = 'create' | 'update' | 'delete';
58
- export interface DocumentChange<T extends Persistent | DocumentObject> {
59
- before?: T;
60
- after?: T;
61
- params?: {
62
- [key: string]: any;
63
- };
64
- type: DocumentChangeType;
65
- }
66
57
  export type DocumentChangeListerner<T extends Persistent | DocumentObject> = (change: DocumentChange<T>) => void;
67
58
  export interface DocumentChangeListernerHandler {
68
59
  uninstall: DocumentListenerUninstaller;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "entropic-bond",
3
3
  "type": "module",
4
- "version": "1.53.8",
4
+ "version": "1.53.9",
5
5
  "description": "Tidy up your messy components",
6
6
  "main": "./lib/entropic-bond.umd.cjs",
7
7
  "module": "./lib/entropic-bond.js",