@zvenigora/ng-eval-core 0.15.1 → 0.16.0

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@zvenigora/ng-eval-core",
3
- "version": "0.15.1",
3
+ "version": "0.16.0",
4
4
  "description": "An expression evaluator for Angular",
5
5
  "repository": {
6
6
  "type": "git",
@@ -658,6 +658,12 @@ declare class EvalContext {
658
658
  get scopes(): Readonly<Stack<Context>>;
659
659
  /**
660
660
  * Gets the lookups registry.
661
+ *
662
+ * A lookup is called while a name is resolved, and how many times an
663
+ * expression calls it is not part of the contract
664
+ * (`docs/backlog-retired.md` A49): it can be called where JavaScript would
665
+ * read nothing, as under `caseInsensitive` by `x = 1`, or more than once for
666
+ * one read, and a registered read hook can add a call.
661
667
  */
662
668
  get lookups(): EvalLookup[];
663
669
  /**
@@ -785,9 +791,18 @@ declare class EvalContext {
785
791
  * not an object that holds the key.
786
792
  *
787
793
  * Undefined means "no receiver of its own", and the member visitor then falls
788
- * back to the object it was evaluating. Up to 0.6.x the prior-scope step
789
- * re-tested the original context and could never answer, and the lookup step
790
- * returned the lookup function itself (`docs/backlog-retired.md` A7).
794
+ * back to the object it was evaluating.
795
+ *
796
+ * It decides by reading the value, through the original or a prior scope's
797
+ * `get`, so a getter there runs where JavaScript reads nothing; how many
798
+ * times an expression calls it is not part of the contract
799
+ * (`docs/backlog-retired.md` A49). Case-sensitively, with a getter `g` on the
800
+ * context, `this.g = 1` calls it once and `this.g += 1` twice, with or
801
+ * without a read hook.
802
+ *
803
+ * Up to 0.6.x the prior-scope step re-tested the original context and could
804
+ * never answer, and the lookup step returned the lookup function itself
805
+ * (`docs/backlog-retired.md` A7).
791
806
  * @param key - The key to retrieve the value for.
792
807
  * @returns The `this` value associated with the key, or undefined.
793
808
  */