@nudojs/core 1.15.0 → 1.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/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { d as AstEnv, A as Abs, b as Phi, T as Term, Q as HofCollectCtx, C as Confidence, S as Shape, a as Pred, R as RelSource, U as HofSite, c as AbsModuleExports, V as RunTranspiledOptions } from './run-DfloWX6i.js';
2
- export { W as $assignRecord, X as $call, Y as $callNamed, Z as $recordBinding, _ as AbsApplyNoThrow, a0 as AbsApplyNoThrowFn, a1 as AbsApplyResult, a2 as AbsApplyReturn, a3 as AbsFnImpl, a4 as AbsSigImpl, a5 as EvalAbsAssignRecord, a6 as EvalCallRecord, a7 as EvalFallback, a8 as EvalPosRecord, a9 as ImplicationOracle, aa as LitValueResult, L as LiteralValue, ab as MAX_EVAL_CALL_DEPTH, ac as MAX_EVAL_TOTAL_CALLS, P as PrimName, ad as RUNTIME_IMPORT_RE, ae as TYPEOF_NAMES, af as TranspiledCallResult, ag as TypeofName, ah as abs, ai as absFunction, aj as absOnly, ak as absToString, al as and, am as anyAbs, an as anyVar, ao as app, ap as assumeFinite, aq as attachFnImpl, ar as bigintLit, as as bindImports, at as bindingsOf, au as bool, av as boolLit, aw as callTranspiledExport, ax as callTranspiledExportApply, ay as callTranspiledExportFull, az as collectAbsExports, aA as confJoin, aB as emptyPhi, aC as eq, aD as evalExprAbs, aE as ge, aF as geNum, aG as getEvalCallCollector, aH as getFnImpl, aI as getImplicationOracle, aJ as gt, aK as gtNum, aL as hostFnCtorFacet, aM as implies, aN as isAbsApplyResult, aO as isAbsVal, aP as isBigPrim, aQ as isCjsMainRun, aR as isExactLit, aS as isNumPrim, aT as isStrPrim, aU as le, aV as leNum, aW as lit, aX as litValue, aY as lt, aZ as ltNum, a_ as makeAbsApplyResult, a$ as markPureFn, b0 as namespaceAbsOf, b1 as ne, b2 as negatePred, b3 as never, b4 as not, b5 as noteEvalCallRecord, b6 as noteEvalFallback, b7 as num, b8 as numLit, b9 as numVar, ba as obj, bb as or, bc as pFalse, bd as pTrue, be as phiAnd, bf as predEquals, bg as predToString, bh as predVars, bi as primToTypeof, bj as ptypeof, bk as pureFnNameOf, bl as relationFingerprint, bm as relationFn, bn as resetEvalCallBudget, bo as runTranspiled, bp as runTranspiledOptionsMemoKey, bq as setEvalAssignCollector, br as setEvalBindingSink, bs as setEvalCallCollector, bt as setEvalFallbackCollector, bu as setImplicationOracle, bv as setPosCollector, bw as shapeOfTerm, bx as shapeOnlyFn, by as shapeToString, bz as simplifyTerm, bA as str, bB as strLit, bC as substPred, bD as termEquals, bE as termToString, bF as tryRunTranspiled, bG as unknown, bH as v } from './run-DfloWX6i.js';
1
+ import { d as AstEnv, A as Abs, b as Phi, T as Term, Q as HofCollectCtx, C as Confidence, S as Shape, a as Pred, U as RelSource, V as HofSite, c as AbsModuleExports, R as RunTranspiledOptions, L as LiteralValue } from './run-T9HWTziZ.js';
2
+ export { W as $assignRecord, X as $call, Y as $callNamed, Z as $recordBinding, _ as AbsApplyNoThrow, a0 as AbsApplyNoThrowFn, a1 as AbsApplyResult, a2 as AbsApplyReturn, a3 as AbsFnImpl, a4 as AbsSigImpl, a5 as EvalAbsAssignRecord, a6 as EvalCallRecord, a7 as EvalFallback, a8 as EvalPosRecord, a9 as ImplicationOracle, aa as LitValueResult, ab as MAX_EVAL_CALL_DEPTH, ac as MAX_EVAL_TOTAL_CALLS, P as PrimName, ad as RUNTIME_IMPORT_RE, ae as TYPEOF_NAMES, af as TranspiledCallResult, ag as TypeofName, ah as abs, ai as absFunction, aj as absOnly, ak as absToString, al as and, am as anyAbs, an as anyVar, ao as app, ap as assumeFinite, aq as attachFnImpl, ar as bigintLit, as as bindImports, at as bindingsOf, au as bool, av as boolLit, aw as callTranspiledExport, ax as callTranspiledExportApply, ay as callTranspiledExportFull, az as collectAbsExports, aA as confJoin, aB as emptyPhi, aC as eq, aD as evalExprAbs, aE as ge, aF as geNum, aG as getEvalCallCollector, aH as getFnImpl, aI as getImplicationOracle, aJ as gt, aK as gtNum, aL as hostFnCtorFacet, aM as implies, aN as isAbsApplyResult, aO as isAbsVal, aP as isBigPrim, aQ as isCjsMainRun, aR as isExactLit, aS as isNumPrim, aT as isStrPrim, aU as le, aV as leNum, aW as lit, aX as litValue, aY as lt, aZ as ltNum, a_ as makeAbsApplyResult, a$ as markPureFn, b0 as namespaceAbsOf, b1 as ne, b2 as negatePred, b3 as never, b4 as not, b5 as noteEvalCallRecord, b6 as noteEvalFallback, b7 as num, b8 as numLit, b9 as numVar, ba as obj, bb as or, bc as pFalse, bd as pTrue, be as phiAnd, bf as predEquals, bg as predToString, bh as predVars, bi as primToTypeof, bj as ptypeof, bk as pureFnNameOf, bl as relationFingerprint, bm as relationFn, bn as resetEvalCallBudget, bo as runTranspiled, bp as runTranspiledOptionsMemoKey, bq as setEvalAssignCollector, br as setEvalBindingSink, bs as setEvalCallCollector, bt as setEvalFallbackCollector, bu as setImplicationOracle, bv as setPosCollector, bw as shapeOfTerm, bx as shapeOnlyFn, by as shapeToString, bz as simplifyTerm, bA as str, bB as strLit, bC as substPred, bD as termEquals, bE as termToString, bF as tryRunTranspiled, bG as unknown, bH as v } from './run-T9HWTziZ.js';
3
3
  import { Node, File } from '@babel/types';
4
- import { p as parseSource, L as LeakBudget, E as EffectiveInterfaceOpts, b as LoadDepsFingerprint, w as CheckReport, N as NudoConstraint, c as ProjectionBudget } from './projection-budget-07VnMktV.js';
5
- export { x as CONSTRAINT_BUILDERS, y as CONSTRAINT_BUILDER_NAMES, z as CONSTRAINT_EXPR_RE, A as CheckAction, C as CheckIssue, B as CheckJson, D as CheckJsonMulti, F as ConstraintBuilder, G as Diagnostic, H as EffectiveInterface, J as GitlabCodeQualityIssue, K as INTERFACE_SOURCE_ABBR, O as InterfaceDiag, I as InterfaceSource, Q as InterfaceTierInfo, a as InterfaceTierOpts, R as NamedImport, S as NudoField, T as NudoFnConstraint, U as NudoSidecarError, V as NudoSig, W as RefineDiag, X as RefineEntry, Y as RefineResolveOpts, Z as SELF, _ as actionsForIssue, $ as andC, a0 as any, a1 as array, a2 as boolean, a3 as checkArg, a4 as checkCall, a5 as constraintAdmitsNullish, a6 as constraintToEntryAbs, a7 as derefConstraint, a8 as drainPromiseMicros, a9 as effectiveInterface, aa as enterPromiseExecutorScope, ab as evalPromiseCtor, ac as evalPromiseMethod, ad as evalPromiseStatic, ae as execNudoModule, af as extractDeclaredThrows, ag as extractFnBudget, ah as extractNudoImports, ai as extractRefineReturnFromSource, aj as extractRefinesFromSource, ak as fn, al as fnConstraintToEntryReqs, am as formatCheckReport, an as formatConstraint, ao as formatDiagnostics, ap as formatEffectiveInterfaceDisplay, aq as formatGithubAnnotations, ar as formatGitlabCodeQuality, as as formatInterfaceTierLine, at as generatedExportNames, au as getParseSourceCacheSize, av as getTerm, aw as instantiateConstraint, ax as interfaceDiagCount, ay as interfaceSourceOf, az as interfaceTierOf, aA as isIntFlag, aB as isNodeModulesPath, aC as isNudoConstraint, aD as lazy, aE as leavePromiseExecutorScope, aF as lenTerm, aG as litC, aH as localNamedExports, aI as notePromiseExecutorFork, aJ as nullable, aK as number, aL as omit, aM as partial, aN as pick, aO as queuePromiseMicro, aP as refineDiagCount, aQ as refineToIndexedFull, aR as resetNudoModuleExecCache, aS as resetParseSourceCache, aT as resetSidecarLoadFailureCache, aU as serializeCheckJson, aV as serializeCheckJsonMulti, aW as setInterfaceDiagCollector, aX as setRefineDiagCollector, aY as shape, aZ as sidecarClosureFingerprint, a_ as sidecarPathOf, a$ as string, b0 as takeInterfaceDiags, b1 as takeInterfaceDiagsSince, b2 as takeRefineDiags, b3 as takeRefineDiagsSince, b4 as throwConstraintToKinds, b5 as union } from './projection-budget-07VnMktV.js';
4
+ import { p as parseSource, L as LeakBudget, E as EffectiveInterfaceOpts, b as LoadDepsFingerprint, w as CheckReport, N as NudoConstraint, c as ProjectionBudget } from './projection-budget-DW-svmIf.js';
5
+ export { x as CONSTRAINT_BUILDERS, y as CONSTRAINT_BUILDER_NAMES, z as CONSTRAINT_EXPR_RE, A as CheckAction, C as CheckIssue, B as CheckJson, D as CheckJsonMulti, F as ConstraintBuilder, G as Diagnostic, H as EffectiveInterface, J as GitlabCodeQualityIssue, K as INTERFACE_SOURCE_ABBR, O as InterfaceDiag, I as InterfaceSource, Q as InterfaceTierInfo, a as InterfaceTierOpts, R as NamedImport, S as NudoField, T as NudoFnConstraint, U as NudoSidecarError, V as NudoSig, W as RefineDiag, X as RefineEntry, Y as RefineResolveOpts, Z as SELF, _ as actionsForIssue, $ as andC, a0 as any, a1 as array, a2 as boolean, a3 as checkArg, a4 as checkCall, a5 as constraintAdmitsNullish, a6 as constraintToEntryAbs, a7 as derefConstraint, a8 as drainPromiseMicros, a9 as effectiveInterface, aa as enterPromiseExecutorScope, ab as evalPromiseCtor, ac as evalPromiseMethod, ad as evalPromiseStatic, ae as execNudoModule, af as extractDeclaredThrows, ag as extractFnBudget, ah as extractNudoImports, ai as extractRefineReturnFromSource, aj as extractRefinesFromSource, ak as fn, al as fnConstraintToEntryReqs, am as formatCheckReport, an as formatConstraint, ao as formatDiagnostics, ap as formatEffectiveInterfaceDisplay, aq as formatGithubAnnotations, ar as formatGitlabCodeQuality, as as formatInterfaceTierLine, at as generatedExportNames, au as getParseSourceCacheSize, av as getTerm, aw as instantiateConstraint, ax as interfaceDiagCount, ay as interfaceSourceOf, az as interfaceTierOf, aA as isIntFlag, aB as isNodeModulesPath, aC as isNudoConstraint, aD as lazy, aE as leavePromiseExecutorScope, aF as lenTerm, aG as litC, aH as localNamedExports, aI as notePromiseExecutorFork, aJ as nullable, aK as number, aL as omit, aM as partial, aN as pick, aO as queuePromiseMicro, aP as refineDiagCount, aQ as refineToIndexedFull, aR as resetNudoModuleExecCache, aS as resetParseSourceCache, aT as resetSidecarLoadFailureCache, aU as serializeCheckJson, aV as serializeCheckJsonMulti, aW as setInterfaceDiagCollector, aX as setRefineDiagCollector, aY as shape, aZ as sidecarClosureFingerprint, a_ as sidecarPathOf, a$ as string, b0 as takeInterfaceDiags, b1 as takeInterfaceDiagsSince, b2 as takeRefineDiags, b3 as takeRefineDiagsSince, b4 as throwConstraintToKinds, b5 as union } from './projection-budget-DW-svmIf.js';
6
6
  export { $add, $arguments, $arr, $arrMutContainer, $arrRest, $arrWithHoles, $async, $asyncReturn, $await, $bitand, $bitnot, $bitor, $bitxor, $catchVal, $class, $classExpr, $collectionForEach, $concat, $copy, $del, $delRes, $div, $dynamicImport, $elems, $eq, $eqLoose, $fnVal, $for, $forInKeys, $forIter, $forOf, $fork, $ge, $gen, $get, $gt, $idx, $idxSet, $importMeta, $in, $instanceof, $instanceofNonIdent, $invoke, $invokeSuper, $isBreakTo, $isForkExit, $join, $le, $len, $lit, $loopBreak, $loopContinue, $loopReturn, $lt, $mod, $mul, $ne, $neLoose, $neg, $new, $not, $nullishTest, $obj, $objAccessor, $objRest, $optionalGet, $optionalInvoke, $orDefault, $pow, $pushLoopExit, $rawThis, $reStateCall, $regex, $rethrowIfNudoReturn, $set, $setKey, $shl, $shr, $spread, $staticInvoke, $sub, $super, $switch, $thisGet, $thisSet, $throw, $toNumber, $toNumeric, $tryCurrentMark, $tryDetachSoftCatch, $tryDigestSoftCatch, $tryDiscardSoft, $tryMark, $tryOrphanSoft, $tryPopMark, $tryReleaseSoftCatch, $tryReleaseSoftOut, $tryTakeSince, $typeof, $unknown, $updateAdd, $updateSub, $ushr, $while, $whileSeq, $yield, DEFAULT_MAX_LOOP_ITERS, EvalClassSpec, NudoLoopSignal, NudoReturn, NudoThrow, NudoUnsupportedError, TranspileOptions, asAbsVal, callAtFunctionBoundary, clearBClasses, clearStaleTermPred, currentExecPhi, fillTuple, foldRequireSpecArg, foldStaticStringExpr, getEvalClass, isArrMutator, isDefinitelyFalse, isDefinitelyTrue, isNudoBreak, isNudoContinue, isNudoReturn, isNudoThrow, litTruth, lookupObjAccessor, namespaceNameOf, pushLoopExit, pushThrowExit, registerEvalClass, runWithLoopExits, runtimeImportOf, takeLoopExits, takeThrowExits, transpile, transpileBodyNode, transpileExpression, transpileFile, transpileSource, withExecPhi } from './exec.js';
7
7
 
8
8
  /**
@@ -86,11 +86,64 @@ declare namespace spy {
86
86
  */
87
87
  declare function mock(): MockHelper;
88
88
 
89
+ /**
90
+ * 剥除选项(**可选**能力;分析面不传 ⇒ 行为与旧版逐字一致)。
91
+ *
92
+ * - report:剥除**事实**回报(只写不改)。migrate strip 的 notes 据此判定
93
+ * 「提示与事实是否一致」——注释 / 字符串里的 "enum " / "namespace "
94
+ * 不是声明,裸正则会误报(Bug 596)。
95
+ * - resolveSpecifier:相对说明符改写(migrate strip 的**产物**面)。
96
+ * 给「相对 spec」返回「产物 spec」,返回 undefined 表示不改写;
97
+ * 包说明符("pkg" / "@scope/pkg")永不进入该回调。
98
+ *
99
+ * report 的字段(**全部可选**;未发生的事实不写 ⇒ 调用方按 `=== true` 判定):
100
+ * - enumRemoved:TS enum 声明被**整条删除**(仅 `declare enum` —— 环境声明
101
+ * 没有运行时语义)。**运行时 enum 现在是被「合成」而不是被删除** ⇒ 用
102
+ * enumSynthesized 判定(Bug 913)。
103
+ * - enumSynthesized:TS enum 被**合成成运行时对象**(Bug 913)。
104
+ * - namespaceKept:非 declare 的 namespace 被保留(运行时语义)。
105
+ * - exportAssignmentRemoved:`export = X` / `export as namespace X` 被剥除
106
+ * (Bug 446)。
107
+ * - thisParamRemoved:TS 的 `this` 形参被从形参数组里删除(Bug 448)。
108
+ * - typeOnlyImportRemoved:**本地**(相对路径)import 的绑定只在类型位置被
109
+ * 用到(值位置零引用)⇒ 被消掉(与 tsc 的 import elision 同口径)(Bug 445)。
110
+ * - typeOnlyImportKept:值位置的导入**被保留**(绑定有值位置引用,或引用
111
+ * 形态判不准 ⇒ 保守保留)⇒ 产物面应当提示人工确认(Bug 445)。
112
+ * - directivesBefore / directivesAfter / directivesDropped:**剥除前后**的
113
+ * `@nudo:` 指令条数比对(Bug 968 的兜底自检)——不等 ⇒ 有指令随被删语句
114
+ * 一起消失。
115
+ * - ctorParamPropsSuperMissing:**派生类**的构造器参数属性降级时,构造器体
116
+ * **顶层**找不到 `super(...)` 调用 ⇒ 赋值只能落回构造器体开头(原生语义:
117
+ * `super()` 之前访问 `this` ⇒ ReferenceError;源本身即非法 TS)⇒ 产物面
118
+ * 应当提示人工确认(Bug 1071)。
119
+ */
120
+ type StripOptions = {
121
+ report?: {
122
+ enumRemoved?: boolean;
123
+ enumSynthesized?: boolean;
124
+ namespaceKept?: boolean;
125
+ exportAssignmentRemoved?: boolean;
126
+ thisParamRemoved?: boolean;
127
+ typeOnlyImportRemoved?: boolean;
128
+ typeOnlyImportKept?: boolean;
129
+ directivesBefore?: number;
130
+ directivesAfter?: number;
131
+ directivesDropped?: boolean;
132
+ ctorParamPropsSuperMissing?: boolean;
133
+ };
134
+ resolveSpecifier?: (spec: string) => string | undefined;
135
+ };
89
136
  /**
90
137
  * 原地剥除 AST 中的 TS-only 语法节点/字段,返回同一棵 AST(便于链式使用)。
91
138
  * 不改写任何 loc/start/end;语句删除只影响所在数组,不重排兄弟节点。
139
+ *
140
+ * @param source 源码文本(可选)。给了就把**类型注解的源码文本**留在节点上
141
+ * (`nudoTypeText` / `nudoReturnTypeText`,见文件头)——分析面据此读回
142
+ * `.ts` 源的声明类型;不给(migrate 的 keepTs 路径等)则纯剥除。
143
+ * @param opts 可选能力(见 StripOptions):剥除事实回报 + 相对说明符改写。
144
+ * 分析面**不传** ⇒ 行为与旧版逐字一致。
92
145
  */
93
- declare function stripTypes<T extends Node>(ast: T): T;
146
+ declare function stripTypes<T extends Node>(ast: T, source?: string, opts?: StripOptions): T;
94
147
 
95
148
  /**
96
149
  * 路径约束栈(Φ)。
@@ -360,6 +413,23 @@ declare function looseEqAbs(a: Abs, b: Abs): boolean | undefined;
360
413
  /**
361
414
  * 对象不变性侧表(freeze/seal/preventExtensions/defineProperty)。
362
415
  * WeakMap 侧表:Abs 不可变,写路径读侧表复现 sloppy 静默失败。
416
+ *
417
+ * Invariants(Bug 295):
418
+ * - 枚举视图分**两套口径**,不得混用:
419
+ * - `enumOwnKeys` = **CopyDataProperties 视图**(自有可枚举键,**含**
420
+ * symbol 投影槽)——原生 spread `{...o}` / **对象 rest** / Object.assign
421
+ * 复制自有可枚举 **symbol 键**(node v26 实测:rest 也拷——`rest[
422
+ * Symbol.toStringTag] === 2`;`{...{[Symbol.iterator](){}}}` 仍可迭代 ⇒
423
+ * 引擎的 @@iterator 协议槽正靠这条拷贝链落地)。
424
+ * - `enumOwnStringKeys` = **字符串键视图**(**剔除** symbol 投影槽)——
425
+ * 原生 for-in / Object.keys|values|entries / getOwnPropertyNames /
426
+ * JSON.stringify 只枚举字符串键。
427
+ * **注意**(Bug 1075):`Object.getOwnPropertyDescriptors` **不在**此列——
428
+ * 原生 gOPDs 走 [[OwnPropertyKeys]](**含** symbol 键:结果对象带真
429
+ * symbol 键,`Object.getOwnPropertySymbols(gOPDs(o))` 看得到)。
430
+ * - 报告建议「给 enumOwnKeys 补 symbolKey 过滤」与原生 oracle 冲突:它会
431
+ * 把 symbol 键从 spread/assign/rest 的拷贝链里剔掉 ⇒ 折坏 @@iterator 协议
432
+ * 槽(core 既有 8 处回归)。故按 oracle 拆两套视图,调用点分流。
363
433
  */
364
434
 
365
435
  type ExtState = "nonext" | "sealed" | "frozen";
@@ -384,6 +454,12 @@ declare function migrateInvariants(from: Abs, to: Abs): void;
384
454
  * NaN 策略(DEC:显式 NaN 臂):操作数可能为 NaN 时结果为
385
455
  * `NaN | number@bounds`。契约 `ge(0).le(100)` 对 NaN 臂诚实报违例;
386
456
  * `if (Number.isNaN(n)) return …` 假臂的 `ne(n, NaN)` 事实可排除 NaN 臂。
457
+ *
458
+ * Invariants(Bug 958):min/max 的**区间端点合并按合取/析取分家**——
459
+ * 合取位(min 的 lo / max 的 hi:`min(a,b) ≥ L ⟺ a ≥ L ∧ b ≥ L`)端点值
460
+ * 相同取**更松**(非 strict)的一侧;析取位(max 的 lo / min 的 hi)取
461
+ * **更严**的一侧。取反会产出**不可满足**谓词(`min(x,0) > 0 ∧ ≤ 0`)⇒
462
+ * 证明器 ex falso 放电 ⇒ 契约门禁假绿 + 分支选错臂且 `conf: exact`。
387
463
  */
388
464
 
389
465
  declare function evalMathMethod(name: string, args: Abs[]): Abs | undefined;
@@ -408,8 +484,44 @@ declare function evalMathMethod(name: string, args: Abs[]): Abs | undefined;
408
484
  * 侧表派发(getter 读折返回体、setter 写走侧表不误抛 writable:false);
409
485
  * 描述符字段语义 = 新建属性缺省 false、已有属性仅显式 false 收紧;
410
486
  * open/index 标记与 invariants/accessor 侧表随不可变更新迁移。
487
+ * - Bug 292:描述符字段语义改按 ES2024 10.4.5 ToPropertyDescriptor 的
488
+ * **字段存在性**(HasProperty)——`get: undefined` 仍是「有 get 字段」
489
+ * (⇒ 与 value/writable 共存 → 定抛)、`writable/enumerable/configurable:
490
+ * undefined` ⇒ ToBoolean → false(收紧,不是「缺省保持原状」)。
491
+ * 安装机器实现 ValidateAndApplyPropertyDescriptor(10.4.9):目标已有键
492
+ * 且**不可配置**时,标志/值/访问机制不可变(不可配置 / 枚举改 / 写门改 /
493
+ * 值改 / 数据↔访问器互转 → 重定义失败);目标为**新键**且不可扩展 → 失败。
494
+ * 已有属性的标志**双向**应用描述符显式字段(未指定字段保持当前值)——
495
+ * enumerable:false → enumerable:true 可恢复(此前只单向收紧,永不恢复)。
496
+ * 失败信号分两面:Object 口径定抛 TypeError(applyPropertyDescriptor)、
497
+ * Reflect 口径返 false 不抛(applyPropertyDescriptorVerdict)。
498
+ * - Bug 300:Proxy [[GetOwnProperty]] 陷阱的单一实现
499
+ * (proxyGetOwnPropDescTrap:派发 + ToPropertyDescriptor 非对象 → 定抛 +
500
+ * completePropDescAbs 补全描述符)——Reflect 面在 builtins/reflect.ts
501
+ * 调用;Object 面需在 builtins/object/methods.ts 接线(越界诉求见报告)。
502
+ * - Bug 1074:Proxy [[GetOwnProperty]] 的**靶一致性不变量**(ES2024 10.5.5
503
+ * step 12.f)——靶自有 + 不可配置 + 不可写的数据属性,陷阱描述符的
504
+ * [[Value]] 必须 SameValue 靶上的实际值,否则原生定抛 TypeError
505
+ * (enforceProxyGetOwnPropDescInvariant;口径与 [[Get]] 面的
506
+ * exec/runtime/state.ts enforceProxyGetInvariant 同源)。
507
+ * - Bug 86:tuple 接收者不再静默丢弃——下标键逐位装(增长段 hole、
508
+ * 空描述符清 hole)、length 键截断/延长(非法 RangeError)、
509
+ * {writable:false} length 以 sealed 近似、frozen 相同值重定义放行。
510
+ * - Bug 117:opts.symbolKey 沿用键的 symbol 投影标记("@@X");
511
+ * wellKnownSymbolSlotKey 供 defineProperty/defineProperties 实参投影。
512
+ * - Bug 118:value 字段直取槽中 Abs 落槽(不经 litValue 往返——
513
+ * fn/obj/tuple/bigint/symbol 值不再丢成「无 value 描述符」)。
411
514
  * - readProperty 是反射/枚举内建 [[Get]] 统一入口:accessorTable thunk
412
515
  * 优先(getter 求值)、数据槽兜底、setter-only 读 undefined。
516
+ * - classifyAssignSet(Bug 128)是 Object.assign 逐键 [[Set]] 单一分类:
517
+ * 自有访问器 setter / __proto__ 原型 setter(null|对象设原型、原始值
518
+ * 忽略、抽象 open)/ 自有·继承非可写定抛 / 其余建自有键。
519
+ * - Bug 210:Proxy [[OwnPropertyKeys]] 的单一实现(proxyOwnKeysTrapKeys
520
+ * 派发 + enforceProxyOwnKeysInvariant 校验)——重复名 / 非字符串键 /
521
+ * 漏靶的不可配置自有键 / 不可扩展靶的多余键 → 原生定抛 TypeError;
522
+ * 不可判面(抽象键 / 抽象靶键集)→ 不抛(sound 保守)。
523
+ * proxyTargetOwnStringKeys / proxyTargetEnumerableStringKeys 给出靶的
524
+ * 自有字符串键面(gOPN / Object.keys 用;internal·inherited·"@@X" 槽剔除)。
413
525
  *
414
526
  * 兄弟模块边界:methods.ts(evalObjectMethod)经导出复用安装机器;
415
527
  * readProperty 供 json.ts(stringify 读值)。
@@ -435,6 +547,27 @@ declare function assignSourceSlots(src: Abs): Record<string, {
435
547
  * Abs 对象原型进 protoTable([[Prototype]] 事实,Bug 67——instanceof 链
436
548
  * 终止判定不得把 null 终止链折 true);第二实参 propertiesObject 逐可
437
549
  * 枚举键过 ToPropertyDescriptor 安装自有属性(Bug 32/23)。
550
+ * - Bug 323:create 的第二实参按**值**判定——「If properties is not
551
+ * undefined」⇒ 显式 `undefined` 与不传同义(整步跳过,不抛);`null` 抛。
552
+ * - Bug 324:defineProperties 的第二实参走 **ToObject**——null/undefined
553
+ * 抛;其它原始值装箱成零自有可枚举属性的包装器 ⇒ 不定义任何属性、不抛
554
+ * (非空字符串例外:装箱后有下标键 ⇒ 描述符是字符 ⇒ TypeError)。
555
+ * - Bug 291:freeze / seal 落**键级标志**(freeze ⇒ writable+configurable
556
+ * 假;seal ⇒ configurable 假)+ isFrozen / isSealed 的**平凡真**判定
557
+ * (不可扩展 ∧ 每个自有属性不可配置 ∧(数据属性)不可写)。
558
+ * - Bug 301:freeze / seal 对 **Proxy** 走陷阱(preventExtensions + 逐键
559
+ * defineProperty;falsy ⇒ TypeError)。
560
+ * - Bug 308:RegExp 实例的自有 `lastIndex`(gOPN = 「全部自有键」语义)
561
+ * 与 gOPD 的数据描述符(可写、非可枚举、不可配置)。
562
+ * - Bug 315:Object.prototype.toLocaleString 的委派在 object-proto.ts;
563
+ * 本模块的描述符面须与之同口径(gOPDs 的访问器描述符 = {get, set})。
564
+ * - Bug 326:键家族(keys/values/entries)对**自有键集不完备**的对象折
565
+ * partial(标记在 prop flags 侧表)——不得折 exact 空元组。
566
+ * - Bug 1075:gOPDs 的自有键面走 [[OwnPropertyKeys]]——**含 symbol 键**
567
+ * (原生 gOPDs 的结果对象带真 symbol 键)⇒ symbol 投影槽**保留**并带
568
+ * `symbolKey` 标记(字符串键面 Object.keys / gOPN 仍剔除它)。
569
+ * - Bug 1077:不可变原型 Object.prototype 置 **null** 原型**放行**
570
+ * (protoChangeAllowed;置非 null 仍拒——Object 面抛 / Reflect 面 false)。
438
571
  * - 未建模方法 → undefined 走通用回退。
439
572
  */
440
573
 
@@ -443,6 +576,18 @@ declare function evalObjectMethod(name: string, args: Abs[]): Abs | undefined;
443
576
 
444
577
  /**
445
578
  * JSON.parse / JSON.stringify
579
+ *
580
+ * Invariants:
581
+ * - **brand 折叠是递归的**(Bug 327):内建 brand(Date / Map / Set / RegExp /
582
+ * Error 族 / TypedArray / 装箱 prim…)的 JSON 值域在**任意深度**折叠——
583
+ * 顶层与对象/数组成员同款(此前白名单只对顶层接收者生效 ⇒ 嵌套 brand 一律
584
+ * 落「may carry BigInt / circular / throwing toJSON」⇒ L1/L2 假红)。
585
+ * - **total ≠ 精确**:值不可知但恒不抛的 brand(TypedArray 家族:元素值未
586
+ * 建模)折 total(值域 partial),**不**折成 "{}"——那会造出自信的错值。
587
+ * - bigint 元素家族(BigInt64Array / BigUint64Array)原生**定抛** TypeError
588
+ * ⇒ 不在 total 集(保持 may-throw 记账)。
589
+ * - reviver(parse)与 replacer(stringify)**两侧口径对称**(Bug 298):
590
+ * callable 回调**真执行**(副作用通道不丢),返回值域保守(unknown)。
446
591
  */
447
592
 
448
593
  /** JSON.parse / stringify:字面量实参真执行折叠;失败硬抛(catch 可吸收) */
@@ -464,6 +609,22 @@ declare function evalGlobalFn(name: string, args: Abs[]): Abs | undefined;
464
609
 
465
610
  /**
466
611
  * Array 构造 / Array.* 静态方法
612
+ *
613
+ * Invariants:
614
+ * - Bug 202:`Array.from(用户 iterable)` **实际驱动**用户迭代器(GetIterator
615
+ * + IteratorNext,元素按迭代序取)——与 elemsOf / for-of / spread 同款
616
+ * 协议;迭代器报告 done ⇒ 元素数确切 ⇒ exact 元组。
617
+ * - Bug 195:`Array.isArray` 认**数组视图标注**(markMatchArrayView)的对象
618
+ * ——标签模板对象是冻结的数组 exotic(原生 true);RegExp exec/match
619
+ * 结果同款(原生亦是真数组)。
620
+ * - Bug 294:array-like 读数(length / 逐索引)**先经访问器侧表**
621
+ * (accessorReadDomain)——真 getter 住侧表、shape 里只有占位槽;
622
+ * 裸读槽 ⇒ length 被当 undefined(折空数组)+ getter 副作用消失。
623
+ * 每次 Array.from 读一次 length / 每个索引(与原生同款)。
624
+ * - Bug 296:`Array.from(items, mapFn, thisArg)` 的**第三实参**透传给
625
+ * 回调(此前丢弃 ⇒ 回调 this 恒 undefined ⇒ 假抛 / 计数器归零)。
626
+ * - Bug 330:Array.prototype.{toString,toLocaleString,join} 接收者为
627
+ * **nullish** ⇒ 定抛 TypeError(ToObject)——不记抛 ⇒ L2 门禁假绿。
467
628
  */
468
629
 
469
630
  declare function makeArrayCtorAbs(args: Abs[]): Abs;
@@ -478,6 +639,18 @@ declare function evalArrayStatic(name: string, args: Abs[]): Abs | undefined;
478
639
  * coercer 槽 total(ToPrimitive 恒得 "[object Object]" → Invalid Date);其余
479
640
  * 抽象 may(coercer 可能产 Symbol/BigInt)。多参形式每个实参直接 ToNumber。
480
641
  * Bug 62:setter 实参逐个 ToNumber 校验;getter/toString 族值域建模。
642
+ *
643
+ * Invariants:
644
+ * - Bug 297:Date 的 time value 是**可写槽**(构造期写入 brand shape 的 tv
645
+ * facet)。`Date.prototype.set*` 族不再是空操作——按规范语义回写该槽
646
+ * (MakeDay/MakeTime 归一化、月日溢出、TimeClip 越界 → Invalid Date,与
647
+ * 原生逐条同口径:实现走**宿主 Date**,两位年映射差异(构造器 1900 偏移 vs
648
+ * setter 不偏移)自动对齐)。**实参不可判定 → 作废该槽**(精确渲染面随之
649
+ * 降级为 may-throw,绝不给过期日期)。getTime/valueOf 与 toISOString 读
650
+ * 同一槽 ⇒ 读面 / 投影面(JSON.stringify)同源,不会自相矛盾。
651
+ * - Bug 319:`toJSON` 单列一档——Invalid Date(tv=NaN)→ **null 字面量**
652
+ * (原生返回 null,不是字符串);tv 已知且有效 → ISO 串;tv 不可知 → 保守
653
+ * `string | null` 域(不再是恒 string)。
481
654
  */
482
655
 
483
656
  declare function evalDateCtor(args: Abs[]): Abs;
@@ -486,6 +659,14 @@ declare function evalDateMethod(name: string, recv: Abs, args: Abs[]): Abs | und
486
659
 
487
660
  /**
488
661
  * RegExp 构造 / brand / 实例方法
662
+ *
663
+ * Invariants:
664
+ * - RegExpExecArray 原生是**数组 exotic**(IsArray = true,继承
665
+ * Array.prototype)⇒ 匹配结果既有**数组方法面**(join / slice / map…,
666
+ * 经 markMatchArrayView 侧表 + 数组方法派发),也有**可迭代面**
667
+ * (spread / for-of / 数组解构)。后者经「@@iterator 槽(非枚举)+
668
+ * 元素侧表」给出(Bug 290)——形状仍是 obj(容器 arr/tuple 无侧槽,
669
+ * #136 的槽读面依赖它)。
489
670
  */
490
671
 
491
672
  declare function evalRegExpCtor(args: Abs[]): Abs;
@@ -556,7 +737,12 @@ declare function isObjectProtoBrand(a: Abs | undefined): boolean;
556
737
  * 与 new 分派在 dispatch.ts。
557
738
  */
558
739
 
559
- declare function evalNamespaceCall(ns: string, method: string, args: Abs[]): Abs | undefined;
740
+ /**
741
+ * 命名空间静态分派。Bug 311:thisVal = 静态方法值的 this 绑定(成员读出的
742
+ * 静态方法被单独调用时的接收者,如 `Promise.resolve.call(null, 1)`);
743
+ * 缺席 = 直接命名空间调用(this ≡ 命名空间构造器,合法)。
744
+ */
745
+ declare function evalNamespaceCall(ns: string, method: string, args: Abs[], thisVal?: Abs): Abs | undefined;
560
746
 
561
747
  /**
562
748
  * Error 家族(ERROR_CTOR_NAMES/isErrorCtorName/errorBrandAbs)+ 宿主构造器
@@ -585,8 +771,8 @@ declare function isErrorCtorName(name: string | undefined): boolean;
585
771
  /**
586
772
  * Error brand:shape 带 name/message(字面量 message 保精确)。
587
773
  * AggregateError(errors, message[, options]):message 在第二实参,errors
588
- * 挂 .errors(原生是实参数组副本);options.cause 挂 .cause(闭槽 miss
589
- * 会折 undefined 假精确——原生 .cause 可能有值)。
774
+ * 挂 .errors(原生是实参数组**副本**——见 iterableListCopy);options.cause
775
+ * 挂 .cause(**仅当 options 真有 cause 键**才装槽——见 Bug 316)。
590
776
  * $new 的 new Error 路径共用——catch 形参成员访问可解。
591
777
  */
592
778
  declare function errorBrandAbs(name: string, args: Abs[]): Abs;
@@ -600,10 +786,13 @@ declare function errorBrandAbs(name: string, args: Abs[]): Abs;
600
786
  * - 两入口是内建构造/实例方法的总分派(exec $new 宿主分支与 Abs 面
601
787
  * evalBuiltinNew 共用各域 builder;未建模名/方法 → undefined 走通用
602
788
  * 回退,不得折精确值)。
603
- * - TA set 三段校验(Bug 38):ToIndex(offset) + ToObject(source) +
604
- * off+srcLen > tgtLen 越界——长度读 binary 域构造入槽的 length 槽
605
- * (makeTypedArrayAbs 数字形态)/ taSetSourceLength(tuple 元数/字符串
789
+ * - TA set 四段校验(Bug 38/304/305):ToIndex(offset) + ToObject(source) +
790
+ * off+srcLen > tgtLen 越界 + 源/目标内容类型一致(number vs bigint)+
791
+ * 逐元素 ToNumber/ToBigInt 转换——长度读 binary 域构造入槽的 length 槽
792
+ * (makeTypedArrayAbs 数字形态)/ taSetSourceLength(tuple 元数/字符串
606
793
  * 长度/TA 源槽/装箱折 0);成功恒返 undefined,元素拷贝值域不建模。
794
+ * 原生报错序(node v26):越界(RangeError)→ 内容类型(TypeError)→
795
+ * 元素转换(TypeError/SyntaxError)——越界不可判时后两段只记 may。
607
796
  * - ArrayBuffer.resize(Bug 39):resizable 槽 false 字面量定抛
608
797
  * TypeError;成功臂 byteLength 槽**原地更新**($set 引用语义惯例——
609
798
  * 别名同步);transfer/grow/slice 不在此扩 scope。
@@ -611,11 +800,24 @@ declare function errorBrandAbs(name: string, args: Abs[]): Abs;
611
800
  * viewLen 定抛 RangeError;读返回域按元素类型(bigint 家族 → bigint)。
612
801
  * - Error 家族 toString/toLocaleString = `${name}: ${message}`(槽已
613
802
  * 建模,空 message 只返 name);Map/Set 方法族落 collections 条目机,
614
- * 迭代三件套经 iterator.ts 协议对象(mapEntryKey/setEntryTuple 条目
615
- * 投影),Set ES2025 方法族先过 binary 域 set-like 校验再 setMethodFold
803
+ * 迭代三件套经 iterator.ts 协议对象(collectionIteratorFor——**live
804
+ * 视图**,Bug 198:新增条目被访问、删除条目被跳过;快照与 live 同投影,
805
+ * live 迭代器不登记静态元素侧表),Set ES2025 方法族先过 binary 域 set-like
806
+ * 校验再 setMethodFold
616
807
  * (不可折 → 集合运算诚实 unknown / is* 抽象 boolean)。
617
808
  */
618
809
 
810
+ /**
811
+ * Bug 198:Map/Set 迭代三件套(keys / values / entries)= **live 视图**的
812
+ * 协议对象——原生迭代器持条目指针:迭代期间**新增**的条目被访问、**删除**的
813
+ * 条目被跳过(`const it = m.keys(); it.next(); m.delete("b"); it.next().done`
814
+ * 原生 true,引擎快照口径折 false)。
815
+ *
816
+ * 投影与 live 视图的**同口径实现**都在 `builtins/error/iterator.ts` 的
817
+ * `collectionIteratorFor`(project 闭包只有一份:Map 的 keys/values 给
818
+ * 键/值,Set 的 entries 给 [el,el] 元组)——本文件此前自建了一份等价实现
819
+ * (绕开 iterator.ts 的投影错配),S17 已改回**直调**。
820
+ */
619
821
  /** new X(...) */
620
822
  declare function evalBuiltinNew(className: string, args: Abs[]): Abs | undefined;
621
823
  /** brand 实例方法(Date/RegExp/Map/Set/Error 家族/装箱拆箱后的 prim 面在外层) */
@@ -669,6 +871,17 @@ declare function stringOfSymbol(a: Abs): Abs;
669
871
 
670
872
  /**
671
873
  * Object.prototype 成员(hasOwnProperty / isPrototypeOf / toString / …)
874
+ *
875
+ * Invariants:
876
+ * - toString 走 typeTagOf 的**标签面**("[object X]");toLocaleString 走
877
+ * **委派面**(Bug 315:node 实测 Object.prototype.toLocaleString 调
878
+ * 接收者的 toString()——**不**调接收者自有的 toLocaleString;接收者没有
879
+ * 可调用的 toString(null 原型对象)⇒ TypeError)。委派面的「读接收者
880
+ * toString 成员」由 exec 侧(member.ts)注册钩子提供(避免
881
+ * builtins↔exec 的 import 环)。
882
+ * - Bug 325:fn 形状的标签按**函数种类**分(Function / AsyncFunction /
883
+ * GeneratorFunction / AsyncGeneratorFunction)——种类戳由 transpile 侧
884
+ * $fnVal opts.kind 打。
672
885
  */
673
886
 
674
887
  /**
@@ -726,10 +939,15 @@ type Slot = {
726
939
  /** ES 规范数组下标(无前导零、< 2^32-1);非规范键返回 undefined */
727
940
  declare function canonicalArrayIndex(v: unknown): number | undefined;
728
941
  /**
729
- * ES ToPropertyKey 的字面量折叠:null→"null"、undefined→"undefined"、
942
+ * ES ToPropertyKey 的折叠:null→"null"、undefined→"undefined"、
730
943
  * true/false→"true"/"false"、number/bigint/string → String(v)(ToString)。
731
944
  * 必须看 term——litValue 把 lit(undefined) 吞成哨兵 undefined。
732
945
  * 抽象 / symbol 返回 undefined(调用方保守处理)。
946
+ *
947
+ * Bug 383:**对象键**也走 ToPropertyKey(ToPrimitive(string) → ToString)——
948
+ * 钩子**真调用**(与 Bug 381 的钩子调用面同口径:副作用与 throw 域随之而来)。
949
+ * 修前只认字面量 term ⇒ 对象键落「抽象键」臂 ⇒ 写被静默丢弃、键的强制
950
+ * 转换副作用全丢。
733
951
  */
734
952
  declare function propertyKeyOf(a: Abs | undefined): string | undefined;
735
953
  type ObjShape = {
@@ -808,6 +1026,16 @@ type MapTable = {
808
1026
  byLit: Map<LitKey, Abs>;
809
1027
  /** 非字面量 key 写入的值(get 未知 key 时 join 用) */
810
1028
  shadowValues: Abs[];
1029
+ /**
1030
+ * Bug 88:身份键条目(同一非字面量值——对象/函数/brand/any 绑定——
1031
+ * 重复写不重复计数)。键不可字面量化但有可判身份(identKeyOf),
1032
+ * size/keys/entries 仍可折 exact;无身份键的非字面量写入仍走
1033
+ * shadowValues(size 保守)。
1034
+ */
1035
+ identEntries: Array<{
1036
+ key: Abs;
1037
+ value: Abs;
1038
+ }>;
811
1039
  /** 抽象分支并入后「可能不存在」的字面量键(get/has 需保守) */
812
1040
  maybeAbsent?: Set<LitKey>;
813
1041
  };
@@ -860,11 +1088,14 @@ declare function makeMapAbs(iterable?: Abs): Abs;
860
1088
  declare function makeSetAbs(iterable?: Abs): Abs;
861
1089
  /** Map#set:fork 内写 overlay;否则原地。返回同一 Abs(JS 可变语义) */
862
1090
  declare function mapSetEntry(mapAbs: Abs, key: Abs | undefined, value: Abs): Abs;
863
- /** Map#delete:fork overlay 内移除字面量键;未知 key 仅标 shadow 不确定 */
1091
+ /** Map#delete:fork overlay 内移除字面量键;未知 key 仅标 shadow 不确定。
1092
+ * Bug 88:引用身份键删除可精确命中(同引用条目移除)/精确 miss(键域全
1093
+ * 特定且无 shadow 时)。any/unknown 等无引用身份的抽象键删除 → 身份条目
1094
+ * 降级 shadow(键可能就是任一身份键,size/get 回保守)。 */
864
1095
  declare function mapDeleteEntry(mapAbs: Abs, key: Abs | undefined): Abs;
865
1096
  /** Map#clear:清空条目;fork 下仍走 overlay */
866
1097
  declare function mapClearEntries(mapAbs: Abs): Abs;
867
- /** Map#get:命中字面量 key → 精确;miss / 未知 key / maybeAbsent / shadow 并 undefined */
1098
+ /** Map#get:命中字面量/身份 key → 精确;miss / 未知 key / maybeAbsent / shadow 并 undefined */
868
1099
  declare function mapGetEntry(mapAbs: Abs, key: Abs | undefined): Abs;
869
1100
  /** Map#has:字面量 miss 折 exact false 时,get 必须是 undefined(不可再并 value) */
870
1101
  declare function mapHasEntry(mapAbs: Abs, key: Abs | undefined): Abs;
@@ -877,9 +1108,12 @@ declare function mapValuesAbs(mapAbs: Abs): Abs[];
877
1108
  declare function mapEntriesAbs(mapAbs: Abs): Abs[];
878
1109
  /** Set#add:fork 内写 overlay;返回同一 Abs */
879
1110
  declare function setAddEntry(setAbs: Abs, value: Abs): Abs;
880
- /** Set#delete:按字面量元素移除;fork overlay 内生效。
1111
+ /** Set#delete:按字面量/身份元素移除;fork overlay 内生效。
881
1112
  * 字面量删除且无残留非字面量元素 → 该臂可精确 miss;
882
- * 臂间分歧由 endCollectionFork 按元素数差标 maybeAbsent。 */
1113
+ * 臂间分歧由 endCollectionFork 按元素数差标 maybeAbsent。
1114
+ * Bug 88:身份删除按绑定级身份匹配(s.add(x); s.delete(x) 同绑定必命中);
1115
+ * 「无残留不确定元素」的精确 miss 判定用引用级身份——any/unknown 元素
1116
+ * 原生可能恰为被删字面量/查询引用,不得当特定值。 */
883
1117
  declare function setDeleteEntry(setAbs: Abs, value: Abs): Abs;
884
1118
  /** Set#clear */
885
1119
  declare function setClearEntries(setAbs: Abs): Abs;
@@ -982,24 +1216,68 @@ declare function formatAbsMultiline(a: Abs, label?: string): string;
982
1216
  * - ObjectPattern / ArrayPattern → 求值占位 `_p{i}`;契约面 = 顶层绑定名
983
1217
  * (对象属性 / 数组元素 Identifier)。嵌套 pattern 的绑定名标 `nested`,
984
1218
  * 消费方可显式降级(C4.5 param-mismatch / 不执法)。
1219
+ *
1220
+ * Bug 479:`tsType` 携带**源码里的 TS 声明类型文本**(剥除 pass 留下的旁路
1221
+ * `nudoTypeText`)——`.ts` 源的形参据此不是「无约束 any」。
1222
+ *
1223
+ * Bug 388:`kind: "pattern"` 同时覆盖 `ObjectPattern` 与 `ArrayPattern`
1224
+ * ⇒ 模型层**记录模式种类**(`patternKind`),渲染层(签名面)与执法层
1225
+ * (契约寻址)才能区分「按属性键寻址」与「按下标寻址」。
1226
+ *
1227
+ * Bug 397:TS 的 `this: T` 是**接收者标注**,不是运行时形参(Babel AST 里
1228
+ * 就是 `Identifier("this")`)⇒ 不进形参表、不占实参位。
1229
+ *
1230
+ * Bug 399:默认形参**可省略** ⇒ 形参表带 `optional` 标记(消费侧据此算
1231
+ * 必选元数,不再靠名字后缀猜)。
985
1232
  */
986
1233
  type FormalParam = {
987
1234
  kind: "id";
988
1235
  name: string;
989
1236
  index: number;
1237
+ tsType?: string;
1238
+ /** 该形参位可省略(Bug 399):true = 不计入必选元数 */
1239
+ optional?: boolean;
990
1240
  } | {
991
1241
  kind: "default";
992
1242
  name: string;
993
1243
  index: number;
1244
+ tsType?: string;
1245
+ /** 默认形参恒可省略(Bug 399) */
1246
+ optional?: boolean;
994
1247
  } | {
995
1248
  kind: "rest";
996
1249
  name: string;
997
1250
  display: string;
998
1251
  index: number;
1252
+ tsType?: string;
1253
+ /** rest 形参恒可省略(Bug 399) */
1254
+ optional?: boolean;
1255
+ /**
1256
+ * S6-1008:rest 形参的**元数信息**(本函数接受的实参个数域)。
1257
+ *
1258
+ * - `min`:**必选元数**——rest 之前**必选**形参的个数(默认形参 /
1259
+ * 带默认值的解构形参可省略 ⇒ 不计;TS 的 `this` 接收者标注不是形参
1260
+ * ⇒ 不计)。
1261
+ * - `variadic`:**变长**——rest 吸收 0..n 个实参 ⇒ 元数**无上界**
1262
+ * (「真正变长」由 core 建模 ⇒ 消费方不再各自按名字后缀猜)。
1263
+ *
1264
+ * 缺省 = undefined(未建模 ⇒ 消费方按既有「定长」口径处理)。
1265
+ */
1266
+ arity?: {
1267
+ min: number;
1268
+ variadic: true;
1269
+ };
999
1270
  } | {
1000
1271
  kind: "pattern";
1001
1272
  /** 求值/签名占位名(generalize 与 dts 用) */
1002
1273
  placeholder: string;
1274
+ /**
1275
+ * 模式种类(Bug 388):
1276
+ * - `"object"` = 对象解构(契约面按**属性键**寻址)
1277
+ * - `"array"` = 数组解构(契约面按**元素下标**寻址)
1278
+ * 缺省 = `"object"`(历史口径)。
1279
+ */
1280
+ patternKind?: "object" | "array";
1003
1281
  /** 顶层可表达绑定名(侧车契约面) */
1004
1282
  bound: string[];
1005
1283
  /**
@@ -1007,6 +1285,11 @@ type FormalParam = {
1007
1285
  * 投影必须用属性键 a(Abs 对象只有 slot a)。
1008
1286
  */
1009
1287
  propKey: Record<string, string>;
1288
+ /**
1289
+ * 数组解构:绑定名 → **元素下标**(`[a, b]` ⇒ a→0、b→1)。
1290
+ * 对象解构不用这张表(对象解构按属性键寻址,见 `propKey`)。
1291
+ */
1292
+ boundIndex?: Record<string, number>;
1010
1293
  /** 仅嵌套内出现、顶层不可单独表达的名(降级用) */
1011
1294
  nested: string[];
1012
1295
  /**
@@ -1015,6 +1298,10 @@ type FormalParam = {
1015
1298
  */
1016
1299
  nestedPaths: string[];
1017
1300
  index: number;
1301
+ /** TS 声明类型文本(.ts 源;缺省 = 无注解) */
1302
+ tsType?: string;
1303
+ /** 带默认值的解构形参(`{ a } = {}`)可省略(Bug 399) */
1304
+ optional?: boolean;
1018
1305
  };
1019
1306
  type AstParam = {
1020
1307
  type: string;
@@ -1022,6 +1309,8 @@ type AstParam = {
1022
1309
  left?: AstParam;
1023
1310
  right?: unknown;
1024
1311
  argument?: AstParam;
1312
+ /** Bug 479:剥除 pass 留下的类型注解文本旁路 */
1313
+ nudoTypeText?: string;
1025
1314
  properties?: Array<{
1026
1315
  key?: AstParam;
1027
1316
  value?: AstParam;
@@ -1037,6 +1326,9 @@ declare function formalParamDisplayNames(formals: FormalParam[]): string[];
1037
1326
  * 签名展示名(C4.1 #64):解构形参渲染为 `{ grade, findings }`,
1038
1327
  * 不落回求值占位 `_p0`——否则读签名的人以为没有契约。
1039
1328
  * 求值/内部键仍用 formalParamDisplayNames(`_p0`)。
1329
+ *
1330
+ * Bug 388:数组解构渲染为 `[ x, y ]`(与源码的解构形态一致)——
1331
+ * 此前对象/数组解构一律渲染 `{ … }`,数组解构的签名面**看得出是对象**。
1040
1332
  */
1041
1333
  declare function formalParamSignatureNames(formals: FormalParam[]): string[];
1042
1334
  /** 侧车契约可绑定的参数名全集 */
@@ -1050,12 +1342,19 @@ declare function contractParamNameSet(formals: FormalParam[]): Set<string>;
1050
1342
  * 多段(field 为展示用点连接串)。平铺精确匹配必须先于任何点路径解析:
1051
1343
  * 源键 'a.b' 与路径 'a.b' 不可歧义——平铺胜。
1052
1344
  * - 未命中 → undefined(C4.5 param-mismatch)
1345
+ *
1346
+ * Bug 388 / 392:命中**数组解构**的顶层 bound 名时,契约面按**元素下标**
1347
+ * 寻址(`[a, b]` 的 `a` 是下标 0 的元素),**不是**属性键 ⇒ 返回
1348
+ * `fieldIndex`(下标)且**不给** `fieldPath`(fieldPath 是对象 slot 投影路径,
1349
+ * 对数组无意义)。执法侧按 `fieldIndex` 投影实参的元素。
1053
1350
  */
1054
1351
  declare function locateContractParam(formals: FormalParam[], contractName: string): {
1055
1352
  index: number;
1056
1353
  field?: string;
1057
1354
  fieldPath?: string[];
1058
1355
  rest?: boolean;
1356
+ /** 数组解构:契约命中的**元素下标**(对象解构无此字段) */
1357
+ fieldIndex?: number;
1059
1358
  } | undefined;
1060
1359
 
1061
1360
  /**
@@ -1112,6 +1411,15 @@ type PolyFn = {
1112
1411
  }>;
1113
1412
  /** body 内对该形参的应用点(check/hover/dts 用) */
1114
1413
  hofSites?: HofSite[];
1414
+ /**
1415
+ * Bug 389:本次求值被 **env 门禁**挡下(源码声明了 `@nudo:env`,但那个 env
1416
+ * **没解析出全局** ⇒ 无注入 ⇒ 函数体 fail-closed ⇒ 符号面 conf=opaque)。
1417
+ *
1418
+ * 门禁本身是对的(不注入就跑 ⇒ 宿主调用会假抛),但「因门禁而 opaque」**不
1419
+ * 是**「路径没覆盖」⇒ 诊断层不得把它当成「已解释」(否则唯一能提示「推断
1420
+ * 失败」的 `nudo:unknown-inference` 恰好在用户把 env 名写错时被吞掉)。
1421
+ */
1422
+ envGated?: boolean;
1115
1423
  };
1116
1424
  declare function extractFn(source: string, fnName: string, fileAst?: ReturnType<typeof parseSource>): {
1117
1425
  params: string[];
@@ -1148,8 +1456,17 @@ declare function listFunctionNames(source: string): string[];
1148
1456
  /**
1149
1457
  * 按 assume 集合构造实参:被 assume 的参数给带约束的符号,其余 any
1150
1458
  * (design-cli-semantics §2:入口无约束 = any,不是 unknown)。
1459
+ *
1460
+ * Bug 976(core 半):被 assume 的形参的 pred 此前被**写死**成 `x > 0`——
1461
+ * 用户写 `--assume 'x>-5'` 时,写死的界**更强**(`x>-5 ∧ x>0 ⇒ x>0`)⇒
1462
+ * 引擎按 `x>0` 剪枝 ⇒ 观察面给出比用户声明**更窄**的结果(说谎)。
1463
+ * 现在:**用户声明的界**(`bounds`:形参名 → Pred)直接落进形参的 pred;
1464
+ * 没有声明界时**不写界**(不替用户发明一个更强的默认界)——Φ(CLI 侧)
1465
+ * 是界的唯一来源。
1151
1466
  */
1152
- declare function buildArgsFromAssume(source: string, fnName: string, assumeIds: Set<string>): Abs[];
1467
+ declare function buildArgsFromAssume(source: string, fnName: string, assumeIds: Set<string>,
1468
+ /** 用户声明的界(形参名 → Pred);缺省 = 不写界 */
1469
+ bounds?: ReadonlyMap<string, Pred>): Abs[];
1153
1470
 
1154
1471
  /**
1155
1472
  * CheckOptions — 从 check.ts 拆出的纯类型,打断 check ↔ check-memo/may-throw 环。
@@ -1178,9 +1495,14 @@ type CheckOptions = {
1178
1495
  /**
1179
1496
  * L2 入口 may-throw 执法档(design-cli-semantics §3)。
1180
1497
  * error(默认)| warning | off。仅作用于 export/default/CJS 入口函数。
1498
+ *
1499
+ * 同时是该 L2 族的**总闸**:模块装载期必抛(`nudo:module-throw`,顶层
1500
+ * 无条件 `throw` ⇒ 模块未被分析)也按此档执法 / 静默 —— 零 FP 语料库
1501
+ * (check-real-packages 的 `entryThrows: "off"`)因此不受新码影响。
1181
1502
  */
1182
1503
  entryThrows?: "error" | "warning" | "off";
1183
- /** L2 --ignore-throws:按 throws 类型名过滤;不吞 L1 */
1504
+ /** L2 --ignore-throws:按 throws 类型名过滤;不吞 L1。
1505
+ * `nudo:module-throw` 同样消费:句法上判得出的抛出类型名被 ignore 即放行。 */
1184
1506
  ignoreThrows?: string[];
1185
1507
  /** 宿主已求值的依赖导出表(specifier → AbsModuleExports);
1186
1508
  * B 与解释路径共用——import/require 按表解析(CLI 经
@@ -1199,6 +1521,17 @@ type CheckOptions = {
1199
1521
  * 入口 may-throw(L2)不评估。调用点参数义务(scan)不受影响。
1200
1522
  */
1201
1523
  skips?: ReadonlyMap<string, Abs | null>;
1524
+ /**
1525
+ * 外部调用点证据(Bug 366):`--from` 采集到的**跨文件**调用点记录。
1526
+ *
1527
+ * drift 判定的「今日域」证据此前**只**来自 checkSource 评估被检查文件
1528
+ * 自身时产生的 AbsCallRecord ⇒ 调用点在别的文件里时,`--from` 写出的
1529
+ * 生成段永远判不出陈旧(假绿)。本字段把跨文件证据接进同一条判定通道。
1530
+ *
1531
+ * 形状 = core 公共导出 AbsCallRecord(fnName = **被调方的导出名**;
1532
+ * callLoc 省略 = 跨文件调用点在本文件内无位置)。
1533
+ */
1534
+ from?: readonly AbsCallRecord[];
1202
1535
  };
1203
1536
 
1204
1537
  /**
@@ -1251,7 +1584,7 @@ declare function checkSource(filePath: string, source: string, phi?: Phi, opts?:
1251
1584
  */
1252
1585
 
1253
1586
  type FnDirectiveScope = {
1254
- /** 绑定名:`f` / `C.m` / `default` / `<anonymous>` */
1587
+ /** 绑定名:`f` / `C.m` / `C.static.m` / `default` / `<anonymous>` */
1255
1588
  name: string;
1256
1589
  node: Node;
1257
1590
  /** 该函数的前导注释块(comment.value 原文,文档序) */
@@ -1261,13 +1594,34 @@ type FnDirectiveScope = {
1261
1594
  /** 与 commentTexts 对齐的注释起始行号 */
1262
1595
  commentStartLines: number[];
1263
1596
  startLine: number;
1597
+ /**
1598
+ * 词法嵌套深度:0 = 顶层函数 / 类成员;每进入一层函数体 +1。
1599
+ *
1600
+ * Bug 424:scope 名**不唯一**(同名遮蔽函数 / 嵌套函数)⇒「按名 + 文档序
1601
+ * 首个命中」会让**内层**同名函数抢走导出函数的注释块 ⇒ L2 门禁假绿 / 假红。
1602
+ * ⇒ 按名查找取**最浅**(depth 最小)的那个。
1603
+ */
1604
+ depth?: number;
1605
+ /** 宿主名(类名 / 外层函数名);顶层为 undefined */
1606
+ owner?: string;
1264
1607
  };
1265
1608
  /**
1266
1609
  * 全量 Function 站点:nested function、class method、object method 均可见。
1267
1610
  * 函数级指令绑「其前导注释块」;注释若带在非函数语句上则不绑(不留孤儿指令)。
1268
1611
  */
1269
1612
  declare function listFnDirectiveScopes(file: File): FnDirectiveScope[];
1270
- /** 按绑定名找函数 scope(文档序第一个命中) */
1613
+ /**
1614
+ * 按绑定名找函数 scope。
1615
+ *
1616
+ * Bug 424:scope 名**不保证唯一**(同名遮蔽函数 / 嵌套同名函数)⇒ 此前
1617
+ * 「文档序**首个**命中」让**内层**同名函数抢走导出函数的注释块 ⇒
1618
+ * 导出函数继承内层的 `@nudo:throws` ⇒ **L2 门禁假绿 / 假红**。
1619
+ *
1620
+ * ⇒ 同名时取**词法最浅**的那个(`depth` 最小:顶层函数 / 类成员 = 0,
1621
+ * 每进入一层函数体 +1);同深度取文档序第一个。
1622
+ * 口径与**分析面**一致:顶层函数先登记(`generalize.ts` 的 env.fns),
1623
+ * 嵌套同名者被跳过 ⇒ 分析面问到的「同名函数」就是最浅的那个。
1624
+ */
1271
1625
  declare function findFnDirectiveScope(file: File, fnName: string): FnDirectiveScope | undefined;
1272
1626
  /**
1273
1627
  * 源文本级函数前导指令行(refine / throws / budget 的消费口)。
@@ -1277,6 +1631,11 @@ declare function fnDirectiveCommentLines(source: string, fnName: string): string
1277
1631
  /**
1278
1632
  * `@nudo:env` 载荷 → 命名 env token。只收 `\w+` 或 path-like
1279
1633
  * (拒绝 `node";` 这类截断捕获)。
1634
+ *
1635
+ * Bug 417:此前**只按 `,` 切分** ⇒ 空格分隔列表(`node web`)被切成**一个**
1636
+ * token 后整条滤掉 ⇒ 零诊断地丢掉整条列表(env 未解析 ⇒ 全局 `unknown`)。
1637
+ * ⇒ 逗号**与**空白两种分隔符都认;尾随的注释先剥掉(行尾注释是最自然的
1638
+ * 写法:`/// @nudo:env node // 只需要 node`)。
1280
1639
  */
1281
1640
  declare function parseEnvPayload(payload: string): string[];
1282
1641
  type MockModuleRecord = {
@@ -1287,6 +1646,11 @@ type MockModuleRecord = {
1287
1646
  /**
1288
1647
  * `@nudo:mock-module "src" [ { a, b } ] from "path"` 载荷解析。
1289
1648
  * 名表 `{ … }` 可选;单源文法(parser / load-deps 共用)。
1649
+ *
1650
+ * Bug 415:两条正则原**硬编码双引号** ⇒ 单引号载荷(`'axios' from './m.js'`)
1651
+ * 两条都不匹配 ⇒ 返回 `undefined` ⇒ 上游既不落诊断也不落记录 ⇒ 指令
1652
+ * **静默蒸发**(mock 不生效、门禁照常绿)。⇒ 单引号与双引号**都认**
1653
+ * (同一对引号必须自洽;source 与 path 的引号种类可不同)。
1290
1654
  */
1291
1655
  declare function parseMockModulePayload(payload: string): MockModuleRecord | undefined;
1292
1656
  type NudoImportRecord = {
@@ -1301,6 +1665,11 @@ type NudoImportRecord = {
1301
1665
  * default 等未识别形态返回 `malformed`(由消费方发诊断)。
1302
1666
  * import 绑定语义 local ← imported:`a as b` 两个名字都保留——只留 local
1303
1667
  * 会让查表用错名字(`exports[b]` miss,BUG-016)。
1668
+ *
1669
+ * Bug 422:**空载荷**(「标签命中但没写载荷」)此前返回 `undefined`
1670
+ * (=「没有这条指令」)⇒ 畸形扫描器**永远看不到它** ⇒ 零诊断。
1671
+ * ⇒ 空载荷是「这条指令写坏了」⇒ 返回 `malformed`,让既有的
1672
+ * `nudo:contract-syntax` 通道自然接管。
1304
1673
  */
1305
1674
  declare function parseNudoImportPayload(payload: string): NudoImportRecord | "malformed-default" | "malformed" | undefined;
1306
1675
  declare function extractFileEnvNames(source: string): string[];
@@ -1310,14 +1679,22 @@ declare function extractNudoImportRecords(source: string): NudoImportRecord[];
1310
1679
  /**
1311
1680
  * 平衡括号摘取(字符串感知;`\` 不是转义——与 case 实参原样 slice 一致)。
1312
1681
  * 返回括号内文本;无平衡括号 → null。
1682
+ *
1683
+ * ⚠ Bug 420:**配平扫描**优先按 JS 转义语义走——串里的 `\"` / `\'` 不再提前
1684
+ * 结束字符串 ⇒ 括号配平正确 ⇒ 含转义引号的 case 不再被**整条丢弃**,诊断也不再
1685
+ * 错误归因为「unclosed argument list」。
1686
+ * ⚠ 串**未闭合**(如 `"a\", -1`——非法 JS 串)时**回退**宽松口径(`\` 不是
1687
+ * 转义)——Bug 1009 钉住的实参切分口径必须保持不变(两个面看到同一个世界)。
1313
1688
  */
1314
1689
  declare function extractBalancedParens(text: string, startIdx: number): string | null;
1315
1690
  type CaseTag = {
1316
1691
  name: string;
1317
1692
  /** 括号内实参原文(未清洗续行 `*`) */
1318
1693
  argsText: string;
1319
- /** `=> expected` 表达式原文(同行/续行 `=>`) */
1694
+ /** `=> expected` 表达式原文(同行/续行 `=>`;已剥 `!! throws` 后缀与冗余括号) */
1320
1695
  expectedText?: string;
1696
+ /** 期望**写了却抽不出**的原因(消费方发 nudo:directive-syntax;Bug 918) */
1697
+ expectedIssue?: string;
1321
1698
  /** 标签在 comment.value 中的下标 */
1322
1699
  tagOffset: number;
1323
1700
  };
@@ -1337,6 +1714,11 @@ declare function scanContractSegments(lines: string[]): string[];
1337
1714
  /**
1338
1715
  * `@nudo:throws …` / case 行 `!! throws …`。
1339
1716
  * 返回 `*` = 申报任意;字符串 = 逗号/空白分隔的 kind 列表;undefined = 无申报。
1717
+ *
1718
+ * Bug 1033:`!! throws` 只在**指令位置**上采信(见 `scanCaseThrowsSuffixSpecs`)⇒
1719
+ * 散文行 / case 名内部的同形文本不再被读成**函数级**申报 ⇒ L2 门禁照常执法。
1720
+ *
1721
+ * Bug 1118:case 后缀按**实参平衡终点**定位 ⇒ 多行实参写法的申报不再丢失。
1340
1722
  */
1341
1723
  declare function scanThrowsDecl(lines: string[]): string | undefined;
1342
1724
  /** `@nudo:budget forks=… calls=… depth=…` → 声明的维度 */
@@ -1353,18 +1735,28 @@ declare function scanBudgetDecl(lines: string[]): {
1353
1735
  * NudoConstraint 表达的域内。只覆盖可判定的标量子集:
1354
1736
  *
1355
1737
  * - prim 门(prim 缺失或不匹配字面量类型 → false)
1356
- * - eq(self, lit v) 字面量等值(SameValue:含 undefined/NaN;与 leq 同口径)
1738
+ * - eq(self, lit v) 字面量等值(`===` + NaN 特例;见 literalSame)
1357
1739
  * - gt/ge/lt/le 数值常数界(self op n)
1358
1740
  * - 字符串长度界(length(self) op n,即 min/max/length 链)
1359
1741
  * - int(整数性)
1360
1742
  * - members(union):任一成员满足即满足
1361
1743
  *
1744
+ * **bigint**(族 11 片 S7 / Bug 915 延伸):`lit(1n)` 这类 bigint 字面量契约
1745
+ * 此前在本通道**判不了**(值域只放行 number / string / boolean / null /
1746
+ * undefined)⇒ 字段位 / 元素位对 bigint 字面量实参**零诊断**(假绿),
1747
+ * 而**标量实参位**(S6 修好)报违例 ⇒ 同一份契约两个位置两种裁决。
1748
+ * 现在字面量值域含 bigint ⇒ 域隶属通道对 bigint 与其余标量同口径。
1749
+ *
1362
1750
  * 对象 / 数组 / 函数域与不可判定的 pred 形态一律 false——保守不满足,
1363
1751
  * 对账侧宁可多报 domain-exceeds 也不放过。
1364
1752
  */
1365
1753
 
1366
- /** 字面量 lv 是否落在约束 c 表达的域内(保守:判不了 → false)。 */
1367
- declare function literalMeetsConstraint(lv: number | string | boolean | null | undefined, c: NudoConstraint, seen?: Set<object>): boolean;
1754
+ /** 字面量 lv 是否落在约束 c 表达的域内(保守:判不了 → false)。
1755
+ *
1756
+ * 值域 = `LiteralValue`(含 **bigint**;族 11 片 S7 / Bug 915 延伸)——
1757
+ * bigint 字面量实参此前不在值域内 ⇒ 域隶属通道对 bigint 恒不满足,
1758
+ * 而调用点的守卫又不放行 bigint ⇒ 字段位 / 元素位对 bigint **零诊断**。 */
1759
+ declare function literalMeetsConstraint(lv: LiteralValue, c: NudoConstraint, seen?: Set<object>): boolean;
1368
1760
 
1369
1761
  /**
1370
1762
  * Abs → NudoConstraint 投影(Phase 1,interface 分层推导的生成侧半边)。
@@ -1406,4 +1798,4 @@ declare function absToConstraint(a: Abs, budget?: ProjectionBudget): NudoConstra
1406
1798
  */
1407
1799
  declare function joinThenProject(absList: Abs[]): NudoConstraint | undefined;
1408
1800
 
1409
- export { Abs, type AbsAssignRecord, type AbsCallRecord, AbsModuleExports, AstEnv, type CaseTag, type CheckOptions, CheckReport, Confidence, EffectiveInterfaceOpts, type Environment, type ExtState, type FnAbs, type FnDirectiveScope, type FormalParam, type FormatOptions, HofCollectCtx, HofSite, type LeqResult, type MockHelper, type MockModuleRecord, NudoConstraint, type NudoImportRecord, OBJECT_PROTO_METHOD_NAMES, type ObjShape, Phi, type PolyFn, Pred, type PropFlags, RelSource, RunTranspiledOptions, Shape, type Slot, Term, type TypeParam, absShapeKey, absToConstraint, add, alphaOf, applyCallbackAbs, applyCallbackValue, asAbs, assignSourceSlots, beginCollectionFork, betaOf, bitandAbs, bitnotAbs, bitorAbs, bitxorAbs, buildArgsFromAssume, builtinCtorAbs, builtinCtorNameOf, callAbsMethod, canonicalArrayIndex, checkSource, clearCollectionTables, cmp, collectAbsFreeVars, collectionElementJoin, collectionExactLen, contractParamNameSet, createEnvironment, createHofCollectCtx, ctorArgDefinitelyInvalid, ctorNameOfRecv, currentPhi, definitelyNotNullishShape, describePhi, div, emptyEnv, endCollectionFork, errorBrandAbs, evalArrayStatic, evalBuiltinInstanceMethod, evalBuiltinNew, evalDateCtor, evalDateMethod, evalDateStatic, evalGlobalFn, evalJsonMethod, evalMathMethod, evalNamespaceCall, evalNumberStatic, evalObjectMethod, evalObjectProtoMethod, evalRegExpCtor, evalRegExpMethod, evalStringStatic, evalSymbolCtor, evictCheckSourceMemoForPaths, evictGeneralizeMemoForPaths, extStateOf, extractBalancedParens, extractFileEnvNames, extractFn, extractMockModuleRecords, extractNudoImportRecords, falseConstraint, findFnDirectiveScope, fnDirectiveCommentLines, fnOf, formalParamDisplayNames, formalParamSignatureNames, formalParamsFromNodes, formatAbs, formatAbsMultiline, formatShape, formatShapeSlot, generalizeAll, generalizeFromAst, getAbsProperty, getGeneralizeMemoSize, getPropFlags, getSlot, hostBuiltinCtorName, instantiateReturn, isErrorCtorName, isMapAbs, isNullProtoObj, isNullishLitAbs, isObj, isObjectProtoBrand, isRelFn, isSetAbs, isSymbolAbs, joinAbs, joinFunctions, joinObjects, joinThenProject, joinValues, leqAbs, listFnDirectiveScopes, listFunctionNames, literalMeetsConstraint, locateContractParam, looseEqAbs, makeArrayCtorAbs, makeMapAbs, makeSetAbs, makeSum, makeSymbolAbs, mapClearEntries, mapDeleteEntry, mapElementFallback, mapEntriesAbs, mapGetEntry, mapHasEntry, mapSetEntry, mapSizeAbs, mapValuesAbs, markExtState, markNullProtoObj, matchRelIdentLit, mergeCollectionArms, migrateInvariants, migrateNullProto, mock, mod, mul, negAbs, notAbs, noteCollectionWrite, objOf, objectProtoBrand, objectProtoMethodAbs, parseEnvPayload, parseMockModulePayload, parseNudoImportPayload, parseSource, popCollectionArm, popPhi, powAbs, projectFlatMapResult, promoteParamShape, propertyKeyOf, protoBrandAbs, protoOfRecv, pushCollectionArm, pushPhi, refineAbsForRelTrue, regexBrandAbsFrom, requiredFnArity, resetCheckSourceMemo, resetGeneralizeMemo, resetPhi, scanBudgetDecl, scanCaseArgSpans, scanCaseTags, scanContractSegments, scanThrowsDecl, setAddEntry, setApplyCallbackHost, setClearEntries, setDeleteEntry, setElementsAbs, setHasEntry, setPropFlags, setSizeAbs, shlAbs, shrAbs, snapshotAbs, spread, spy, strictEqAbs, stringOfSymbol, stripTypes, stub, sub, substAbs, substPredAbs, symbolDescriptionAbs, symbolIdOf, toNumberAbs, trueConstraint, tryMakeRegexAbs, tryPromoteDirectCall, tryPromoteForOfIteratee, tryPromoteHofCallback, tryPromoteReceiverAsArr, typeofAbs, undefAbs, ushrAbs, withPhiConstraint, withVar };
1801
+ export { Abs, type AbsAssignRecord, type AbsCallRecord, AbsModuleExports, AstEnv, type CaseTag, type CheckOptions, CheckReport, Confidence, EffectiveInterfaceOpts, type Environment, type ExtState, type FnAbs, type FnDirectiveScope, type FormalParam, type FormatOptions, HofCollectCtx, HofSite, type LeqResult, LiteralValue, type MockHelper, type MockModuleRecord, NudoConstraint, type NudoImportRecord, OBJECT_PROTO_METHOD_NAMES, type ObjShape, Phi, type PolyFn, Pred, type PropFlags, RelSource, RunTranspiledOptions, Shape, type Slot, Term, type TypeParam, absShapeKey, absToConstraint, add, alphaOf, applyCallbackAbs, applyCallbackValue, asAbs, assignSourceSlots, beginCollectionFork, betaOf, bitandAbs, bitnotAbs, bitorAbs, bitxorAbs, buildArgsFromAssume, builtinCtorAbs, builtinCtorNameOf, callAbsMethod, canonicalArrayIndex, checkSource, clearCollectionTables, cmp, collectAbsFreeVars, collectionElementJoin, collectionExactLen, contractParamNameSet, createEnvironment, createHofCollectCtx, ctorArgDefinitelyInvalid, ctorNameOfRecv, currentPhi, definitelyNotNullishShape, describePhi, div, emptyEnv, endCollectionFork, errorBrandAbs, evalArrayStatic, evalBuiltinInstanceMethod, evalBuiltinNew, evalDateCtor, evalDateMethod, evalDateStatic, evalGlobalFn, evalJsonMethod, evalMathMethod, evalNamespaceCall, evalNumberStatic, evalObjectMethod, evalObjectProtoMethod, evalRegExpCtor, evalRegExpMethod, evalStringStatic, evalSymbolCtor, evictCheckSourceMemoForPaths, evictGeneralizeMemoForPaths, extStateOf, extractBalancedParens, extractFileEnvNames, extractFn, extractMockModuleRecords, extractNudoImportRecords, falseConstraint, findFnDirectiveScope, fnDirectiveCommentLines, fnOf, formalParamDisplayNames, formalParamSignatureNames, formalParamsFromNodes, formatAbs, formatAbsMultiline, formatShape, formatShapeSlot, generalizeAll, generalizeFromAst, getAbsProperty, getGeneralizeMemoSize, getPropFlags, getSlot, hostBuiltinCtorName, instantiateReturn, isErrorCtorName, isMapAbs, isNullProtoObj, isNullishLitAbs, isObj, isObjectProtoBrand, isRelFn, isSetAbs, isSymbolAbs, joinAbs, joinFunctions, joinObjects, joinThenProject, joinValues, leqAbs, listFnDirectiveScopes, listFunctionNames, literalMeetsConstraint, locateContractParam, looseEqAbs, makeArrayCtorAbs, makeMapAbs, makeSetAbs, makeSum, makeSymbolAbs, mapClearEntries, mapDeleteEntry, mapElementFallback, mapEntriesAbs, mapGetEntry, mapHasEntry, mapSetEntry, mapSizeAbs, mapValuesAbs, markExtState, markNullProtoObj, matchRelIdentLit, mergeCollectionArms, migrateInvariants, migrateNullProto, mock, mod, mul, negAbs, notAbs, noteCollectionWrite, objOf, objectProtoBrand, objectProtoMethodAbs, parseEnvPayload, parseMockModulePayload, parseNudoImportPayload, parseSource, popCollectionArm, popPhi, powAbs, projectFlatMapResult, promoteParamShape, propertyKeyOf, protoBrandAbs, protoOfRecv, pushCollectionArm, pushPhi, refineAbsForRelTrue, regexBrandAbsFrom, requiredFnArity, resetCheckSourceMemo, resetGeneralizeMemo, resetPhi, scanBudgetDecl, scanCaseArgSpans, scanCaseTags, scanContractSegments, scanThrowsDecl, setAddEntry, setApplyCallbackHost, setClearEntries, setDeleteEntry, setElementsAbs, setHasEntry, setPropFlags, setSizeAbs, shlAbs, shrAbs, snapshotAbs, spread, spy, strictEqAbs, stringOfSymbol, stripTypes, stub, sub, substAbs, substPredAbs, symbolDescriptionAbs, symbolIdOf, toNumberAbs, trueConstraint, tryMakeRegexAbs, tryPromoteDirectCall, tryPromoteForOfIteratee, tryPromoteHofCallback, tryPromoteReceiverAsArr, typeofAbs, undefAbs, ushrAbs, withPhiConstraint, withVar };