@mnemonica/tactica 0.1.14 → 0.1.15

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/analyzer.d.ts CHANGED
@@ -12,6 +12,9 @@ export declare class MnemonicaAnalyzer {
12
12
  private edsUsages;
13
13
  private flowUsages;
14
14
  private edsScopeByNode;
15
+ private functionBindings;
16
+ private nestedWrapVia;
17
+ private wrapEntryByNode;
15
18
  private typeAliases;
16
19
  private variableToTypeMap;
17
20
  private moduleObjectVariables;
@@ -351,8 +354,36 @@ export declare class MnemonicaAnalyzer {
351
354
  * returns undefined for calls outside any type scope (module top level).
352
355
  */
353
356
  private resolveEDSScope;
357
+ /**
358
+ * Resolve a wrap() argument to its function node without the type
359
+ * checker: direct function expressions/arrows, or same-file bindings
360
+ * (`const fn = () => ...`, `function fn() ...`). Best effort — method
361
+ * references, .bind() products and cross-file identifiers stay
362
+ * unresolved; the callsite entry itself is still recorded.
363
+ */
364
+ private resolveFunctionArgument;
365
+ /**
366
+ * Analyse a wrapped function's body for guaranteed runtime paths:
367
+ * dive wraps returned functions as well (recursively), so each
368
+ * function-valued return is a nested wrap site, and each `new Type()`
369
+ * inside the body means the path hits that type's constructor (which
370
+ * attachHooks wraps too). Both facts are 100% ensured, so they are
371
+ * recorded AoT. Nested function bodies are NOT walked here — they
372
+ * belong to their own wrap analysis, reached via the return chain.
373
+ * Depth-capped and cycle-guarded.
374
+ */
375
+ private analyzeWrappedBody;
376
+ /**
377
+ * Record one function-valued return of a wrapped body as a nested wrap
378
+ * site (`via` = the site whose wrapping caused it) and recurse into
379
+ * its own returns. Returns through identifiers resolve through the
380
+ * same-file bindings table; unresolvable returns are simply skipped.
381
+ */
382
+ private recordWrappedReturn;
354
383
  /**
355
384
  * Add an EDS usage to the collection
385
+ * Returns the stored entry (the existing one when this is a duplicate),
386
+ * so callers can enrich it after nested body analysis.
356
387
  */
357
388
  private addEDS;
358
389
  /**