@base-framework/base 3.0.189 → 3.0.191
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.
- package/dist/base.js +1 -1
- package/dist/base.js.map +3 -3
- package/dist/types/shared/objects.d.ts +30 -30
- package/package.json +1 -1
|
@@ -1,62 +1,62 @@
|
|
|
1
1
|
export namespace Objects {
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Creates a new object, optionally extending from another object.
|
|
4
4
|
*
|
|
5
|
-
* @param {object} [
|
|
6
|
-
* @returns {object}
|
|
5
|
+
* @param {object} [prototype] - The prototype object to extend from.
|
|
6
|
+
* @returns {object} The newly created object.
|
|
7
7
|
*/
|
|
8
|
-
function create(
|
|
8
|
+
function create(prototype?: any): any;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Extends properties from the source object to the target object.
|
|
11
|
+
* Only copies properties that are not already defined on the target object.
|
|
11
12
|
*
|
|
12
|
-
* @param {
|
|
13
|
-
* @param {
|
|
14
|
-
* @returns {object}
|
|
13
|
+
* @param {object} sourceObj - The source object.
|
|
14
|
+
* @param {object} targetObj - The target object to extend.
|
|
15
|
+
* @returns {object|false} The extended target object or false if invalid.
|
|
15
16
|
*/
|
|
16
17
|
function extendObject(sourceObj: any, targetObj: any): any;
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
+
* Deep clones an object in a safe and scalable manner.
|
|
19
20
|
*
|
|
20
|
-
* @param {object} obj
|
|
21
|
-
* @returns {object}
|
|
21
|
+
* @param {object} obj - The object to clone.
|
|
22
|
+
* @returns {object} A deep clone of the object.
|
|
22
23
|
*/
|
|
23
24
|
function clone(obj: any): any;
|
|
24
25
|
/**
|
|
25
|
-
*
|
|
26
|
+
* Retrieves the prototype of a class or object.
|
|
26
27
|
*
|
|
27
|
-
* @
|
|
28
|
-
* @
|
|
29
|
-
* @returns {object}
|
|
28
|
+
* @param {function|object} entity - The class or object.
|
|
29
|
+
* @returns {object} The prototype of the entity.
|
|
30
30
|
*/
|
|
31
|
-
function getClassObject(
|
|
31
|
+
function getClassObject(entity: any): any;
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Extends a class or object with the properties of another class or object.
|
|
34
34
|
*
|
|
35
|
-
* @param {function|object} sourceClass
|
|
36
|
-
* @param {function|object} targetClass
|
|
37
|
-
* @returns {object}
|
|
35
|
+
* @param {function|object} sourceClass - The source class or object.
|
|
36
|
+
* @param {function|object} targetClass - The target class or object.
|
|
37
|
+
* @returns {object|false} The resulting extended object or false if invalid.
|
|
38
38
|
*/
|
|
39
39
|
function extendClass(sourceClass: any, targetClass: any): any;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Checks if an object has a specific property.
|
|
42
42
|
*
|
|
43
|
-
* @param {object} obj
|
|
44
|
-
* @param {string} prop
|
|
45
|
-
* @returns {boolean}
|
|
43
|
+
* @param {object} obj - The object to check.
|
|
44
|
+
* @param {string} prop - The property to check for.
|
|
45
|
+
* @returns {boolean} True if the object has the property.
|
|
46
46
|
*/
|
|
47
47
|
function hasOwnProp(obj: any, prop: string): boolean;
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
49
|
+
* Determines if a value is a plain object.
|
|
50
50
|
*
|
|
51
|
-
* @param {object} obj
|
|
52
|
-
* @returns {boolean}
|
|
51
|
+
* @param {object} obj - The value to check.
|
|
52
|
+
* @returns {boolean} True if the value is a plain object.
|
|
53
53
|
*/
|
|
54
54
|
function isPlainObject(obj: any): boolean;
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* Checks if an object is empty.
|
|
57
57
|
*
|
|
58
|
-
* @param {object} obj
|
|
59
|
-
* @returns {boolean}
|
|
58
|
+
* @param {object} obj - The object to check.
|
|
59
|
+
* @returns {boolean} True if the object has no own properties.
|
|
60
60
|
*/
|
|
61
61
|
function isEmpty(obj: any): boolean;
|
|
62
62
|
}
|