@expressive/mvc 0.12.0 → 0.13.1

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
@@ -17,7 +17,6 @@ declare namespace Subscriber {
17
17
  declare class Subscriber<T extends {} = any> {
18
18
  parent: Control<T>;
19
19
  onUpdate: Subscriber.OnEvent;
20
- static get<T extends {}>(from: T): Subscriber<T> | undefined;
21
20
  proxy: T;
22
21
  release: Callback;
23
22
  latest?: Model.Event<T>[];
@@ -26,10 +25,9 @@ declare class Subscriber<T extends {} = any> {
26
25
  watch: Map<any, boolean | (() => true | void)>;
27
26
  constructor(parent: Control<T>, onUpdate: Subscriber.OnEvent);
28
27
  get using(): Model.Key<T>[];
29
- assign(apply: Model.Compat<T>, keys?: any): void;
30
28
  add(key: any, value?: boolean | Callback): void;
31
- commit: () => () => void;
32
- private event;
29
+ commit(): () => void;
30
+ private onEvent;
33
31
  }
34
32
 
35
33
  declare const LOCAL = "$debug local";
@@ -164,11 +162,6 @@ declare class Model {
164
162
  }
165
163
 
166
164
  declare namespace Control {
167
- /**
168
- * Callback for Controller.for() static method.
169
- * Returned callback is forwarded.
170
- */
171
- type OnReady<T extends {}> = (control: Control<T>) => Callback | void;
172
165
  /**
173
166
  * Called immediately when any key is changed or emitted.
174
167
  * Returned callback is notified when update is complete.
@@ -192,9 +185,6 @@ declare class Control<T extends {} = any> {
192
185
  ref<K extends Model.Key<T>>(key: K, handler?: (this: T, value: T[K]) => boolean | void): (value: any) => void;
193
186
  update(key: Model.Key<T>): void;
194
187
  clear(): void;
195
- static get<T extends {}>(from: T): Control<T> | undefined;
196
- static for<T extends {}>(subject: T): Control<T>;
197
- static for<T extends {}>(subject: T, cb: Control.OnReady<T>): Callback;
198
188
  }
199
189
 
200
190
  /**
@@ -567,6 +557,9 @@ declare class Global extends MVC {
567
557
  static keepAlive: boolean;
568
558
  }
569
559
 
560
+ declare namespace tap {
561
+ type Callback<T extends Model> = (instance: T | undefined) => void | boolean;
562
+ }
570
563
  /**
571
564
  * Find and attach most applicable instance of Model via context.
572
565
  *