/** * Opt-in `--canonicalize-braces` migration-verify comparator (W2). * * The default `kern migrate native-handlers --verify` requires the compiled * TypeScript to stay BYTE-identical before/after. That rejects the * `if-non-block-then` / `while-non-block` / `for-of-non-block` lift, because the * native-KERN emitter always braces control-flow bodies: `if (x) return x;` * re-emits as `if (x) { return x; }` — a real byte difference. * * `isBraceOnlyDelta` is the SOUND relaxation that backs the opt-in mode. It * accepts an `after` file iff it differs from `before` ONLY by the closed, * semantics-preserving transform: * * a non-block control-flow body `S` ↔ a single-statement block `{ S }` * * applied at if-then / if-else / while / for / for-of / do body positions. * * Safety (the #1 invariant — a false-accept silently miscompiles user code): * - Direction: only a BEFORE-side non-block statement may be wrapped in an * AFTER-side `{ S }`. The emitter never removes braces, so this is the only * shape that can occur; the reverse is rejected. * - Every node outside a relaxed body position must match by source text * (`getText()`), and every leaf token must match by text — so any operator * change, rename, reordering, inserted/dropped statement, or moved `else` * fails. Dangling-else is caught structurally: an `if` with vs without an * `else` has a different child count. * - The ordered list of comment texts must be identical: brace insertion * never adds, drops, or rewrites a comment, so any comment delta rejects. * A false-reject (a correct migration left raw) is acceptable; a false-accept * is structurally impossible. */ /** True when `afterText` differs from `beforeText` only by brace-wrapping * non-block control-flow bodies (and is otherwise byte-for-byte identical in * tokens and comments). */ export declare function isBraceOnlyDelta(beforeText: string, afterText: string): boolean;