@azrico/webobject 1.1.38 → 1.1.40
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.
|
@@ -76,6 +76,6 @@ export declare class WebObject extends SimpleObject {
|
|
|
76
76
|
* Get a list of web objects
|
|
77
77
|
* default order of parameters : search,readonly,fetchID
|
|
78
78
|
*/
|
|
79
|
-
static get_list
|
|
79
|
+
static get_list(...p: any[]): Promise<WebObject[]>;
|
|
80
80
|
}
|
|
81
81
|
export default WebObject;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropOf } from "./SimpleObject";
|
|
1
|
+
import { PropOf, WriteablePropOf } from "./SimpleObject";
|
|
2
2
|
import SimpleObject from "./SimpleObject";
|
|
3
3
|
import { saveResultType } from "./SimpleObject";
|
|
4
4
|
/**
|
|
@@ -43,7 +43,7 @@ export declare class ObjectManager<ObjType extends SimpleObject> {
|
|
|
43
43
|
* @param value
|
|
44
44
|
* @return true if changed , false otherwise
|
|
45
45
|
*/
|
|
46
|
-
setValue(key:
|
|
46
|
+
setValue(key: WriteablePropOf<ObjType>, value: any): Promise<boolean>;
|
|
47
47
|
/**
|
|
48
48
|
* set key of subObject
|
|
49
49
|
* @param key
|
|
@@ -4,12 +4,8 @@ export declare type saveResultType = "normal" | "nothing" | "error" | "canceled"
|
|
|
4
4
|
export declare type saveType = "normal" | "quick";
|
|
5
5
|
export declare type sendChangesType = boolean | "auto";
|
|
6
6
|
declare type PropType<obj, prop extends keyof obj> = obj[prop];
|
|
7
|
-
declare type
|
|
8
|
-
|
|
9
|
-
}[keyof T], undefined>;
|
|
10
|
-
declare type NonFunctionKeyNames<T> = ExcludeKeyNames<T, Function>;
|
|
11
|
-
declare type RemoveFunctions<T> = Pick<T, NonFunctionKeyNames<T>>;
|
|
12
|
-
export declare type PropOf<obj> = keyof RemoveFunctions<obj>;
|
|
7
|
+
export declare type PropOf<obj> = keyof obj;
|
|
8
|
+
export declare type WriteablePropOf<obj> = keyof obj;
|
|
13
9
|
export declare class SimpleObject extends MapableObject {
|
|
14
10
|
#private;
|
|
15
11
|
static readonly __cache_name?: string;
|
|
@@ -35,16 +31,16 @@ export declare class SimpleObject extends MapableObject {
|
|
|
35
31
|
loadValues(initObject: any, fullUpdate?: boolean): boolean;
|
|
36
32
|
static loadValues(obj: SimpleObject, initObject: any, fullUpdate?: boolean): boolean;
|
|
37
33
|
static getValue<T extends SimpleObject, MKey extends PropOf<T>>(o: T, key: MKey, original?: boolean): PropType<T, MKey> | undefined;
|
|
38
|
-
getValue: <MKey extends
|
|
39
|
-
get: <MKey extends
|
|
34
|
+
getValue: <MKey extends keyof this>(key: MKey, original?: boolean) => PropType<this, MKey>;
|
|
35
|
+
get: <MKey extends keyof this>(key: MKey, original?: boolean) => PropType<this, MKey>;
|
|
40
36
|
/**
|
|
41
37
|
* set value
|
|
42
38
|
* @param key
|
|
43
39
|
* @param value
|
|
44
40
|
* @return true if changed , false otherwise
|
|
45
41
|
*/
|
|
46
|
-
setValue(key:
|
|
47
|
-
set: (key:
|
|
42
|
+
setValue(key: WriteablePropOf<this>, value: any, sendChanges?: sendChangesType): Promise<boolean>;
|
|
43
|
+
set: (key: WriteablePropOf<this>, value: any, sendChanges?: sendChangesType) => Promise<boolean>;
|
|
48
44
|
/**
|
|
49
45
|
* set key of subObject
|
|
50
46
|
* @param key
|