@expressive/mvc 1.0.0-beta.21 → 1.0.0-beta.22

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": "@expressive/mvc",
3
- "version": "1.0.0-beta.21",
4
3
  "description": "Use classes to define state in React!",
4
+ "version": "1.0.0-beta.22",
5
5
  "author": {
6
6
  "name": "Gabe Klein",
7
7
  "email": "gabe@termtm.com",
@@ -43,8 +43,14 @@
43
43
  "react-test-renderer": "^17.0.2",
44
44
  "rollup": "^2.52.2",
45
45
  "rollup-plugin-typescript2": "^0.30.0",
46
+ "semantic-release": "^18.0.1",
46
47
  "ts-jest": "^27.0.3",
47
48
  "tslib": "^2.3.0",
48
49
  "typescript": "typescript@>=3.8 <5.0"
50
+ },
51
+ "release": {
52
+ "branches": [
53
+ { "name": "beta", "prerelease": true }
54
+ ]
49
55
  }
50
56
  }
@@ -116,6 +116,9 @@ export function tap <T extends Class> (Type: T, required?: boolean): InstanceOf<
116
116
  export function on <T = any> (initialValue: undefined, onUpdate: InterceptCallback<T>): T | undefined;
117
117
  export function on <T = any> (initialValue: T, onUpdate: InterceptCallback<T>): T;
118
118
 
119
+ /** Object with references to all managed values of `T`. */
120
+ export type Refs <T extends Model> = { [P in Model.Fields<T>]: Model.Ref<T[P]> };
121
+
119
122
  /**
120
123
  * Creates an object with references to all managed values.
121
124
  * Each property will set value in state when invoked.
@@ -124,7 +127,7 @@ export function on <T = any> (initialValue: T, onUpdate: InterceptCallback<T>):
124
127
  *
125
128
  * @param target - Source model from which to reference values.
126
129
  */
127
- export function ref <T = Model> (target: T): { [P in Model.Fields<T>]: Model.Ref<T[P]> };
130
+ export function ref <T extends Model> (target: T): Refs<T>;
128
131
 
129
132
  /**
130
133
  * Creates a ref-compatible property.