@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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbonorm/carbonreact",
3
3
  "license": "MIT",
4
- "version": "4.0.8",
4
+ "version": "4.0.10",
5
5
  "browser": "dist/index.umd.js",
6
6
  "module": "dist/index.esm.js",
7
7
  "main": "dist/index.cjs.js",
@@ -62,7 +62,8 @@ abstract class CarbonReact<P = {}, S extends iCarbonReactState = iCarbonReactSta
62
62
 
63
63
  protected target: typeof CarbonReact;
64
64
 
65
- protected static _instance: CarbonReact<any, any>;
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
- protected updateRestfulObjectArrays = <ObjectType extends { [key: string]: any; } = {}>
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
- protected deleteRestfulObjectArrays = <ObjectType extends { [key: string]: any } = {}>
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