Files
agency/.pnpm-store/v3/files/d5/6eb42e7a16e7cff1c044c2c33ad3cfc6e03a1e099e3255a9f4d9e98a1cb5d4dde1e52803ff9ce75ca4bd9209f9009ddf258f5a2606dd95164b1f68d118675a
hanzo-agent 5af6960b87 run project
Run: sess_f37640604ae254cb4d11dc6217f7b721
2026-09-30 00:04:56 +00:00

43 lines
1.8 KiB
Plaintext

import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
interface WrappingFixerParams {
/**
* Descendant of `node` we want to preserve.
* Use this to replace some code with another.
* By default it's the node we are modifying (so nothing is removed).
* You can pass multiple nodes as an array.
*/
innerNode?: TSESTree.Node | TSESTree.Node[];
/** The node we want to modify. */
node: TSESTree.Node;
/** Source code. */
sourceCode: Readonly<TSESLint.SourceCode>;
/**
* The function which gets the code of the `innerNode` and returns some code around it.
* Receives multiple arguments if there are multiple innerNodes.
* E.g. ``code => `${code} != null` ``
*/
wrap?: (...code: string[]) => string;
}
/**
* Wraps node with some code. Adds parentheses as necessary.
* @returns Fixer which adds the specified code and parens if necessary.
*/
export declare function getWrappingFixer(params: WrappingFixerParams): (fixer: TSESLint.RuleFixer) => TSESLint.RuleFix;
/**
* If the node to be moved and the destination node require parentheses, include parentheses in the node to be moved.
* @param sourceCode Source code of current file
* @param nodeToMove Nodes that need to be moved
* @param destinationNode Final destination node with nodeToMove
* @returns If parentheses are required, code for the nodeToMove node is returned with parentheses at both ends of the code.
*/
export declare function getMovedNodeCode(params: {
destinationNode: TSESTree.Node;
nodeToMove: TSESTree.Node;
sourceCode: Readonly<TSESLint.SourceCode>;
}): string;
/**
* Check if a node will always have the same precedence if its parent changes.
*/
export declare function isStrongPrecedenceNode(innerNode: TSESTree.Node): boolean;
export {};