@carbonorm/carbonreact 4.0.8 → 4.0.10
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/CarbonReact.d.ts +3 -3
- package/dist/index.cjs.js +2 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/CarbonReact.tsx +5 -3
package/package.json
CHANGED
package/src/CarbonReact.tsx
CHANGED
|
@@ -62,7 +62,8 @@ abstract class CarbonReact<P = {}, S extends iCarbonReactState = iCarbonReactSta
|
|
|
62
62
|
|
|
63
63
|
protected target: typeof CarbonReact;
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
// @link https://stackoverflow.com/questions/55029032/what-is-typescripts-thistype-used-for
|
|
66
|
+
protected static _instance: ThisType<CarbonReact<any, any>>;
|
|
66
67
|
|
|
67
68
|
static getInstance<T extends CarbonReact<any, any>>(): T {
|
|
68
69
|
return this._instance as T;
|
|
@@ -74,13 +75,14 @@ abstract class CarbonReact<P = {}, S extends iCarbonReactState = iCarbonReactSta
|
|
|
74
75
|
this._instance = instance;
|
|
75
76
|
}
|
|
76
77
|
|
|
77
|
-
|
|
78
|
+
// these are public but the class is abstract
|
|
79
|
+
public updateRestfulObjectArrays = <ObjectType extends { [key: string]: any; } = {}>
|
|
78
80
|
(rest: Omit<iUpdateRestfulObjectArrays<ObjectType, S, P>, "instance">) => updateRestfulObjectArrays<ObjectType, S, P>({
|
|
79
81
|
instance: this,
|
|
80
82
|
...rest
|
|
81
83
|
});
|
|
82
84
|
|
|
83
|
-
|
|
85
|
+
public deleteRestfulObjectArrays = <ObjectType extends { [key: string]: any } = {}>
|
|
84
86
|
(rest: Omit<iDeleteRestfulObjectArrays<ObjectType, S, P>, "instance">) => deleteRestfulObjectArrays<ObjectType, S, P>({
|
|
85
87
|
instance: this,
|
|
86
88
|
...rest
|