@zvenigora/ng-eval-core 0.15.0 → 0.15.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/package.json
CHANGED
|
@@ -2053,6 +2053,15 @@ type EvalKnownOptions = {
|
|
|
2053
2053
|
onHookError?: EvalHookErrorPolicy;
|
|
2054
2054
|
};
|
|
2055
2055
|
|
|
2056
|
+
/**
|
|
2057
|
+
* The options `EvalService` and `CompilerService` pass on every parse, as
|
|
2058
|
+
* this object itself; `ParserService` and `DiscoveryService` copy it when
|
|
2059
|
+
* constructed. Read it or copy it; do not write into it. A value written into
|
|
2060
|
+
* it is not reliably seen: the parse cache remembers it by identity, so a text
|
|
2061
|
+
* cached before the write can keep its reading, and one parsed while it held
|
|
2062
|
+
* the value can keep that reading after it is written back
|
|
2063
|
+
* (`docs/backlog-retired.md` A34).
|
|
2064
|
+
*/
|
|
2056
2065
|
declare const defaultParserOptions: ParserOptions;
|
|
2057
2066
|
|
|
2058
2067
|
/**
|
|
@@ -2220,6 +2229,15 @@ declare class ParserService implements OnDestroy {
|
|
|
2220
2229
|
/**
|
|
2221
2230
|
* Gets the parser options: the constructor's, or the last value given to
|
|
2222
2231
|
* the setter.
|
|
2232
|
+
*
|
|
2233
|
+
* Replace the object through the setter rather than write into the one this
|
|
2234
|
+
* returns: a value written into it is not reliably seen. The parse cache,
|
|
2235
|
+
* and `CompilerService`'s cache of compiled strings, remember each pair of
|
|
2236
|
+
* options objects, this one and a call's, by identity, not by their values.
|
|
2237
|
+
* A later parse through a pair seen before the write, as `EvalService`'s and
|
|
2238
|
+
* `CompilerService`'s are, keeps a cached text's earlier reading and caches
|
|
2239
|
+
* a new text as if the options had not changed; a parse through a new
|
|
2240
|
+
* call-options object sees the write (`docs/backlog-retired.md` A34).
|
|
2223
2241
|
*/
|
|
2224
2242
|
get parserOptions(): ParserOptions;
|
|
2225
2243
|
/**
|
|
@@ -2272,7 +2290,10 @@ declare class ParserService implements OnDestroy {
|
|
|
2272
2290
|
* @description
|
|
2273
2291
|
* Parses expression and returns ES6/ES2023 AST.
|
|
2274
2292
|
* @param expr expression to parse
|
|
2275
|
-
* @param options optional parser options
|
|
2293
|
+
* @param options optional parser options, merged over `parserOptions`. Pass
|
|
2294
|
+
* a new object for new options: a value written into an object already
|
|
2295
|
+
* passed is not reliably seen, since the cache remembers the object by
|
|
2296
|
+
* identity (`docs/backlog-retired.md` A34).
|
|
2276
2297
|
* @returns The parsed AST (Abstract Syntax Tree).
|
|
2277
2298
|
*/
|
|
2278
2299
|
parse(expr: string, options?: ParserOptions): Program | AnyNode | Expression | undefined;
|
|
@@ -2520,7 +2541,7 @@ declare class CompilerService extends BaseEval implements OnDestroy {
|
|
|
2520
2541
|
* the `ParserService.parserOptions` setter reaches a string compiled before
|
|
2521
2542
|
* it (`docs/colon-identifiers/phase-9-plan.md` § 3.2). The memo is
|
|
2522
2543
|
* `ParserService`'s kind, and a write in place goes unseen here as there
|
|
2523
|
-
* (`docs/backlog.md` A34). `null` when that parse bypasses `ParserService`'s
|
|
2544
|
+
* (`docs/backlog-retired.md` A34). `null` when that parse bypasses `ParserService`'s
|
|
2524
2545
|
* cache - a callback or a `program` among its options, or a value JSON
|
|
2525
2546
|
* cannot hold - and this cache then bypasses too, since a cached function
|
|
2526
2547
|
* runs no callback.
|