Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | /**
* One operation in a postfix chain, reduced to what rendering it needs.
*
* #1652: `expressions` was `unknown[]` and held live `Parser.ExpressionContext`
* values. The type named no parse type, so `parse-tree-confined-to-parser`
* counted `PostfixChainBuilder` as clean while it was handed parse nodes and
* passed them back out to be rendered -- the under-measurement that let the
* render layer reach zero with the coupling intact.
*
* The shape is `TPlannedTargetOp`'s, which the WRITE path already used: a count
* to decide on, and a thunk to render with.
*/
interface IPostfixOperation {
/** Member name if this is a member access */
memberName: string | null;
/** How many subscript expressions this operation carries: 0, 1 or 2. */
indexCount: number;
/**
* The subscript indexes, rendered on demand.
*
* A THUNK, and that is load-bearing rather than stylistic: rendering an index
* can queue a pending temp declaration, so it must happen behind the branch
* that uses the result. A member access renders none, and eagerly rendering
* would queue a temp for a chain that never asked.
*/
renderIndexes: () => string[];
}
export default IPostfixOperation;
|