export interface CardinalityFill { /** 1-based file line of the `@downstream` tag the codemod filled. */ readonly line: number; /** `path:symbol` target of the edge that received a cardinality. */ readonly target: string; /** The cardinality that was appended. */ readonly kind: 'step' | 'branch'; } export interface UnresolvedEdge { /** 1-based file line of the `@downstream` tag the codemod left untouched. */ readonly line: number; /** `path:symbol` target the codemod could not fill. */ readonly target: string; /** * - `ambiguous` — analyzer could not classify the edge; needs a human. * - `non-trivial-form` — the `@downstream` declaration spans lines or * carries trailing text the codemod won't blindly rewrite. */ readonly reason: 'ambiguous' | 'non-trivial-form'; } export interface RewriteResult { /** The rewritten source — strictly equal to the input when nothing changed. */ readonly text: string; /** Every edge whose cardinality the codemod filled in. */ readonly fills: readonly CardinalityFill[]; /** Every edge the codemod left untouched but a human still needs to address. */ readonly unresolved: readonly UnresolvedEdge[]; } /** * Walks `source` for `@flow_step` sites, classifies each `@downstream` edge * whose cardinality is missing, and returns the rewritten text plus a record * of what was filled and what remains for the user. * * `source` must be parseable TypeScript. Files whose parse fails are the * caller's concern — the codemod surfaces `collectFlowStepSites`'s throw. */ export declare function rewriteFlowCardinality(source: string): RewriteResult; //# sourceMappingURL=add-cardinality.d.ts.map