@expressive/mvc 0.21.1 → 0.21.2

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/lib/index.d.ts CHANGED
@@ -93,7 +93,7 @@ declare class Control<T extends Model = any> {
93
93
  declare function control<T extends Model>(subject: T, ready: Control.OnReady<T>): Callback;
94
94
  declare function control<T extends Model>(subject: T, ready?: boolean): Control<T>;
95
95
  declare function watch<T extends Model>(on: T, cb: Observer): T;
96
- declare function apply<T = any>(instruction: Control.Instruction<any>): T;
96
+ declare function apply<T = any>(instruction: Control.Instruction<T>): T;
97
97
 
98
98
  declare const STATE = "__state";
99
99
  declare const UPDATE = "__update";
@@ -388,7 +388,7 @@ declare namespace Context {
388
388
  }
389
389
  declare class Context {
390
390
  private table;
391
- private input;
391
+ private layer;
392
392
  private has;
393
393
  get<T extends Model>(Type: Model.Type<T>): T | undefined;
394
394
  include(inputs: Context.Inputs): Map<Model, boolean>;
package/lib/index.esm.js CHANGED
@@ -959,7 +959,7 @@ const Oops = issues({
959
959
  class Context {
960
960
  constructor() {
961
961
  this.table = new WeakMap();
962
- this.input = new Map();
962
+ this.layer = new Map();
963
963
  }
964
964
  has(T) {
965
965
  let key = this.table.get(T);
@@ -979,14 +979,14 @@ class Context {
979
979
  const init = new Map();
980
980
  for (const key in inputs) {
981
981
  const input = inputs[key];
982
- const exists = this.input.get(key);
982
+ const exists = this.layer.get(key);
983
983
  if (exists)
984
984
  if (exists !== input)
985
985
  throw Oops.NewValue(key);
986
986
  else
987
987
  continue;
988
988
  const instance = this.add(input);
989
- this.input.set(key, input);
989
+ this.layer.set(key, input);
990
990
  init.set(instance, true);
991
991
  }
992
992
  for (const [model] of init) {
@@ -1028,7 +1028,7 @@ class Context {
1028
1028
  }
1029
1029
  push() {
1030
1030
  const next = create(this);
1031
- next.input = new Map();
1031
+ next.layer = new Map();
1032
1032
  return next;
1033
1033
  }
1034
1034
  pop() {
@@ -1041,7 +1041,7 @@ class Context {
1041
1041
  }
1042
1042
  for (const model of items)
1043
1043
  model.null();
1044
- this.input.clear();
1044
+ this.layer.clear();
1045
1045
  }
1046
1046
  }
1047
1047
 
package/lib/index.js CHANGED
@@ -963,7 +963,7 @@ const Oops = issues({
963
963
  class Context {
964
964
  constructor() {
965
965
  this.table = new WeakMap();
966
- this.input = new Map();
966
+ this.layer = new Map();
967
967
  }
968
968
  has(T) {
969
969
  let key = this.table.get(T);
@@ -983,14 +983,14 @@ class Context {
983
983
  const init = new Map();
984
984
  for (const key in inputs) {
985
985
  const input = inputs[key];
986
- const exists = this.input.get(key);
986
+ const exists = this.layer.get(key);
987
987
  if (exists)
988
988
  if (exists !== input)
989
989
  throw Oops.NewValue(key);
990
990
  else
991
991
  continue;
992
992
  const instance = this.add(input);
993
- this.input.set(key, input);
993
+ this.layer.set(key, input);
994
994
  init.set(instance, true);
995
995
  }
996
996
  for (const [model] of init) {
@@ -1032,7 +1032,7 @@ class Context {
1032
1032
  }
1033
1033
  push() {
1034
1034
  const next = create(this);
1035
- next.input = new Map();
1035
+ next.layer = new Map();
1036
1036
  return next;
1037
1037
  }
1038
1038
  pop() {
@@ -1045,7 +1045,7 @@ class Context {
1045
1045
  }
1046
1046
  for (const model of items)
1047
1047
  model.null();
1048
- this.input.clear();
1048
+ this.layer.clear();
1049
1049
  }
1050
1050
  }
1051
1051
 
package/package.json CHANGED
@@ -27,5 +27,5 @@
27
27
  "preversion": "npm run test && npm run build",
28
28
  "postversion": "git push & npm publish"
29
29
  },
30
- "version": "0.21.1"
30
+ "version": "0.21.2"
31
31
  }