@azrico/webobject 1.5.63 → 1.5.65

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,4 +1,4 @@
1
- import { PropOf, WriteablePropOf } from "@azrico/types";
1
+ import { PropOf, PropType, WriteablePropOf } from "@azrico/types";
2
2
  import SimpleObject, { WithManager } from "./SimpleObject";
3
3
  import { saveResultType, sendChangesType } from "./SimpleObject";
4
4
  import { ClassType } from "@azrico/types";
@@ -47,12 +47,12 @@ export declare class ObjectManager<ObjType extends SimpleObject> extends RawObje
47
47
  getSaveResultType(): saveResultType | null;
48
48
  setSaveResult(toObj: any, type: saveResultType): saveResultType | undefined;
49
49
  apply_changes(): boolean;
50
- get(key: PropOf<ObjType>, original?: boolean): import("@azrico/types").PropType<ObjType, any> | null;
50
+ get(key: PropOf<ObjType>, original?: boolean): PropType<ObjType, any> | null;
51
51
  /**
52
52
  * use a property from the object, this will return latest value of the property
53
53
  * uses `EventManager` to detect changes
54
54
  */
55
- use(key: PropOf<ObjType>): Pick<this, any>;
55
+ use<MKey extends PropOf<ObjType>>(key: MKey): PropType<ObjType, MKey>;
56
56
  /**
57
57
  * set value
58
58
  * @param key
@@ -75,7 +75,7 @@ export declare class SimpleObject extends MapableObject {
75
75
  *
76
76
  * Only objects with a manager can use this function
77
77
  */
78
- use(key: PropOf<this>): PropType<this, keyof this> | Pick<ObjectManager<any>, any>;
78
+ use<MKey extends PropOf<this>>(key: MKey): PropType<this, MKey>;
79
79
  getSubValue: (key: PropOf<this>, subkey: string, original?: boolean) => any;
80
80
  /**
81
81
  * set value of a key only if the value is empty (null,undef,"")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/webobject",
3
- "version": "1.5.63",
3
+ "version": "1.5.65",
4
4
  "description": "Stateful object",
5
5
  "author": "Azrideus",
6
6
  "license": "MIT",