import { J } from '../../java'; /** JavaScript operator precedence, as ordered by the ECMAScript grammar; a higher number binds tighter. */ export declare const Precedence: { /** `a, b` */ readonly Comma: 1; /** `=`, `+=`, `? :`, `=>`, `yield`, `...` — everything at `AssignmentExpression` level. */ readonly Assignment: 2; /** `||` and `??` */ readonly LogicalOr: 3; /** `&&` */ readonly LogicalAnd: 4; /** `|` */ readonly BitOr: 5; /** `^` */ readonly BitXor: 6; /** `&` */ readonly BitAnd: 7; /** `==` `!=` `===` `!==` */ readonly Equality: 8; /** `<` `>` `<=` `>=` `in` `instanceof` `as` `satisfies` */ readonly Relational: 9; /** `<<` `>>` `>>>` */ readonly Shift: 10; /** `+` `-` */ readonly Additive: 11; /** `*` `/` `%` */ readonly Multiplicative: 12; /** `**` (right-associative) */ readonly Exponentiation: 13; /** `!` `~` `+` `-` `++x` `--x` `typeof` `void` `delete` `await` */ readonly Prefix: 14; /** `x++` `x--` */ readonly Postfix: 15; /** `new X` without an argument list */ readonly New: 16; /** `a.b` `a[b]` `f()` `new X()` `` tag`...` `` */ readonly Call: 17; /** Literals, identifiers, parenthesized expressions, array/object literals, JSX. */ readonly Primary: 18; }; /** The precedence of `expression` as printed; a kind this module does not model counts as Primary. */ export declare function precedenceOf(expression: J): number; /** The precedence of the slot of `parent` holding `childId`; see {@link slotConstraints} for the rest. */ export declare function requiredPrecedence(parent: J, childId: string): number | undefined; /** Parenthesizes `expression` if the slot of `parent` holding `childId` would otherwise reparse it. */ export declare function maybeParenthesize(parent: J | undefined, childId: string, expression: J, slotOwnsTrailingMarkers?: boolean): J; /** The nearest enclosing LST node in a cursor path, skipping the padding wrappers visitors push. */ export declare function enclosingTree(cursor: { value: any; parent?: any; } | undefined): J | undefined; /** Wraps in `J.Parentheses`, moving the prefix out so the surrounding whitespace survives. */ export declare function parenthesize(expression: J, slotOwnsTrailingMarkers?: boolean): J.Parentheses; /** Whether the printed form begins with `{`, `function` or `class`. */ export declare function startsWithDeclarationToken(expression: J): boolean; //# sourceMappingURL=precedence.d.ts.map