/** * The compiler-owned collection rosters: which member names a List, Map, Set * or Record publishes, what lowering operation each one names, which of them * mutate their receiver, and which return a fresh value a statement must not * discard. * * D115 §三: this was the head of `analysis/collections.ts`. It is data, not * inference — no host, no analyzer — and it is read from three places (the * call families here, member resolution in `../members.ts`, and the analyzer's * discarded-result check), so it is the one file of this directory that * depends on nothing else in it. */ import { type CollectionOperation } from "../../contracts.ts"; export declare const listCollectionOperations: Map; export declare const mapCollectionOperations: Map; export declare const setCollectionOperations: Map; export declare const recordCollectionOperations: Map; export declare const discardedPureCollectionOperations: Set; export declare const CORE_LIST_METHOD_NAMES: readonly ["get", "slice", "append", "extend", "insert", "remove", "pop", "clear", "copy", "has", "count", "index", "find", "some", "every", "map", "flatMap", "filter", "reduce", "join", "sorted", "reversed", "sum", "min", "max", "unique", "compact", "flatten", "chunk", "partition", "groupBy", "keyBy", "countBy", "zip", "repeat"]; export declare const CORE_MAP_METHOD_NAMES: readonly ["get", "set", "getOrSet", "getOrSetWith", "update", "has", "remove", "clear", "copy", "iterator", "keys", "values", "entries"]; export declare const CORE_SET_METHOD_NAMES: readonly ["add", "update", "has", "remove", "clear", "copy", "values", "union", "intersection", "difference"]; export declare const CORE_RECORD_METHOD_NAMES: readonly ["get", "set", "has", "remove", "clear", "copy", "keys", "values", "entries"]; /** * Every name a collection publishes: `size`, which is a property rather than a * method, and the method roster above it. Member resolution and the editor's * completion read these one roster, so a member the checker accepts is a member * the editor offers — before D114 F4 the editor kept its own copy of the list, * and that copy predated the S3 pipeline members. The `…_METHOD_NAMES` rosters * stay separate because the surface-version digest counts methods, and `size` * is not one. */ export declare const CORE_LIST_MEMBER_NAMES: readonly string[]; export declare const CORE_MAP_MEMBER_NAMES: readonly string[]; export declare const CORE_SET_MEMBER_NAMES: readonly string[]; export declare const CORE_RECORD_MEMBER_NAMES: readonly string[]; /** * The collection methods that change their receiver, by the kind of collection * the receiver is. `readonly` refuses exactly these through a read-only view, * and the Web extension's watch analysis asks the same question of a watch * body: a call of one of these on the watched collection is a write of the * subject, exactly as an assignment to it is. * * One roster, one answer. Two copies of it would be one concept with two * definitions -- the shape this repository keeps finding -- and the copy that * fell behind would be the one that decided whether a program compiles. */ export declare function mutatingCollectionMethods(kind: "list" | "map" | "set" | "record"): ReadonlySet; //# sourceMappingURL=operations.d.ts.map