/** * A7 and A13: an empty collection beside a loop that only copies, or only * projects, is the expanded form of a compiler-owned conversion or of a List * pipeline. Both proofs are deliberately narrow — they accept only stable * sources and effect-free projections — because a canonicalization advisory * that guesses is lint noise. * * D115 §三 / D114 R1f: one family of `advisories.ts`. */ import { type Statement } from "../../ast.ts"; import { type AdvisoryHost } from "./roster.ts"; export declare class CollectionAdvisories { private readonly host; constructor(host: AdvisoryHost); /** * A7: an adjacent empty collection plus an identity-only copy loop has one * compiler-owned spelling. Unlike A1-A6 this is not a foreign-language * spelling with different semantics; it is the deliberately narrow * canonicalization exception admitted after those advisories. The trigger * proves the replacement is the same fresh collection in the same order: * * const result: List = [] * for value in values: * result.append(value) * * becomes an initialization from `values.values()`. Any intervening * statement, non-name source, transform, filter, second body statement, or * non-empty destination withholds the advisory. Those shapes need judgment, * and a canonicalization warning that guesses is only lint noise. */ adviseManualCollectionConversion(previous: Statement | null, statement: Statement): void; private isEmptyCollectionInitializer; private manualCollectionReplacement; private orderedDirectCallArguments; private manualCollectionLoopSlot; /** * A13: a fresh List filled by one pure projection, with an optional pure * guard, is the expanded form of List.map or List.filter(...).map(...). * * This stays deliberately narrower than a general loop-style lint. List * pipelines snapshot their input while a `for` observes live growth, so the * proof accepts only stable List data, stable data reads/operators, and the * compiler-owned pure `Type.from(value)` projection. Calls, getters, index * reads, writes, a second body statement, two-slot loops, and reads from the * destination keep the loop silent. */ adviseManualListPipeline(previous: Statement | null, statement: Statement): void; private manualListPipelineSourceSpelling; private manualListPipelineWrite; /** Rebuilds the pure data-expression subset admitted inside an A13 pipeline. */ private manualListPipelineExpressionSpelling; } //# sourceMappingURL=collections.d.ts.map