import type { TSESLint, TSESTree } from "@typescript-eslint/utils";
/**
 * True when `node` is something other than a pure literal — i.e. it references
 * a binding or computes a value at runtime. `Literal` (string/number/boolean/
 * regex/etc.) and bare `TemplateLiteral` (no interpolations are non-literal in
 * themselves) return false; everything else (Identifier, MemberExpression,
 * CallExpression, …) returns true.
 *
 * Useful for skipping noise like `1 + 1` or `` `hello ${"x"}` `` when a rule
 * cares whether an expression touches a real binding.
 */
export declare const isNonLiteralRef: (node: TSESTree.Node) => boolean;
/**
 * True when `node` represents an explicit `undefined` value — either the
 * `undefined` identifier or `void <expr>` (which always evaluates to
 * `undefined`).
 */
export declare const isUndefinedExpression: (node: TSESTree.Node) => boolean;
/**
 * Strips TypeScript-only expression wrappers (`x as T`, `x satisfies T`, `x!`,
 * `<T>x`) that don't change the runtime value, so the underlying expression can
 * be inspected — e.g. `StepResponse.skip() as any` unwraps to the call.
 */
export declare const unwrapTsExpression: (node: TSESTree.Expression) => TSESTree.Expression;
/**
 * The three AST node types that represent a function value:
 * `ArrowFunctionExpression`, `FunctionExpression`, and `FunctionDeclaration`.
 */
export type FunctionNode = TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression | TSESTree.FunctionDeclaration;
/**
 * Recursively walks the AST rooted at `node`, calling `visit` for every
 * descendant (including `node` itself). When `visit` returns `false` the walk
 * does not descend into that subtree's children — useful for "skip nested
 * function bodies" patterns.
 *
 * Skips the `parent` back-reference. Generic over the standard TSESTree shape;
 * does not know about parser-specific extension keys.
 */
export declare const walkAst: (node: TSESTree.Node | null | undefined, visit: (node: TSESTree.Node) => boolean | void) => void;
/**
 * True for `ArrowFunctionExpression`, `FunctionExpression`, and
 * `FunctionDeclaration`. Narrows to `FunctionNode`; accepts nullable input so
 * it can guard optional fields like a declarator's `init`.
 */
export declare const isFunctionNode: (node: TSESTree.Node | null | undefined) => node is FunctionNode;
/**
 * Returns the static key name of an object-literal property when it can be
 * resolved without scope analysis — either an `Identifier` key or a string
 * `Literal` key. Returns `null` for computed keys, non-`Property` elements
 * (spread, methods written as `SpreadElement`), and numeric/template keys.
 */
export declare const getPropertyKeyName: (prop: TSESTree.ObjectLiteralElement) => string | null;
/**
 * Returns the first non-computed `Property` on `obj` whose static key name
 * matches `name`, or `null` if none exists. Skips `SpreadElement`s and any
 * `Property` with a computed/non-string/non-identifier key.
 */
export declare const findProperty: (obj: TSESTree.ObjectExpression, name: string) => TSESTree.Property | null;
/**
 * Resolves an expression to the object literal it denotes, when that can be
 * determined without type information:
 * - An `ObjectExpression` is returned as-is.
 * - An `Identifier` is resolved through scope to a `const x = { ... }` binding.
 *
 * Returns `null` when the value can't be statically resolved to an object
 * literal (call expressions, spreads of unknown bindings, re-exports, etc.).
 * Callers that need to assert something about the object's shape should treat a
 * `null` result as "can't tell" and skip the check to avoid false positives.
 */
export declare const resolveObjectExpression: (node: TSESTree.Node | null | undefined, scope: TSESLint.Scope.Scope | null) => TSESTree.ObjectExpression | null;
/**
 * Whether an object literal is known to carry a property named `name`.
 *
 * Returns `true`/`false` when it can be determined statically, and `"unknown"`
 * when the object contains a `SpreadElement` — the property could be supplied
 * by the spread, so a rule must not flag its absence.
 */
export declare const objectHasProperty: (obj: TSESTree.ObjectExpression, name: string) => boolean | "unknown";
/**
 * Returns the name of the `VariableDeclarator` that directly initializes
 * `call`, e.g. `export const myWorkflow = createWorkflow(...)` → `"myWorkflow"`.
 *
 * Only matches when the call is the direct initializer of an identifier-bound
 * declarator — not when nested inside an object/array/etc. on the right-hand
 * side. Returns `null` otherwise.
 */
export declare const getInitializedVariableName: (call: TSESTree.CallExpression) => string | null;
/**
 * Walks the scope chain starting at `scope`, returning the first variable that
 * matches `name`. Returns `null` if no enclosing scope binds the name.
 */
export declare const findVariableInScope: (scope: TSESLint.Scope.Scope | null, name: string) => TSESLint.Scope.Variable | null;
/**
 * Resolves an identifier to the function it refers to — either a `function`
 * declaration or a `const x = () => …` / `const x = function () {}`
 * initializer. Walks the scope chain from `scope` to find the binding.
 *
 * Returns `null` when the binding isn't a project-local function (e.g. a
 * re-export from another module, or a non-function value). Useful for
 * resolving the function behind a default-export identifier
 * (`export default handler`, `export { handler as default }`).
 */
export declare const resolveFunctionFromIdentifier: (scope: TSESLint.Scope.Scope | null, identifier: TSESTree.Identifier) => FunctionNode | null;
/**
 * If `variable` has exactly one definition and that definition is a `const`
 * declaration initialized with a string literal, returns the literal's value.
 * Returns `null` otherwise — including for `let`/`var`, non-literal initializers,
 * and variables with multiple definitions (which can't be trusted as constants).
 */
export declare const getConstStringInit: (variable: TSESLint.Scope.Variable) => string | null;
/**
 * Resolves `node` to a string value when possible:
 * - If `node` is a string `Literal`, returns its value.
 * - If `node` is an `Identifier` that resolves to a single `const` string
 *   initializer in an enclosing scope, returns that literal's value.
 *
 * `reportNode` is the node a rule should anchor its diagnostic on — the
 * literal itself when the value is inline, the identifier when resolved via
 * scope. Returns `null` when the value cannot be statically resolved.
 */
export declare const resolveStaticStringValue: (node: TSESTree.Node, scope: TSESLint.Scope.Scope) => {
    value: string;
    reportNode: TSESTree.Node;
} | null;
/**
 * Returns the expression a function returns, when it can be determined
 * statically:
 * - Arrow with expression body: that expression.
 * - Arrow or function with a single top-level `return <expr>`: that expression.
 * Returns `null` otherwise (multiple returns, bare `return`, void). Does not
 * descend into nested functions.
 */
export declare const getReturnedExpression: (fn: TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression) => TSESTree.Expression | null;
export declare const returnTypeIsPromise: (fn: TSESTree.FunctionExpression | TSESTree.FunctionDeclaration | TSESTree.ArrowFunctionExpression | TSESTree.TSEmptyBodyFunctionExpression) => boolean;
/**
 * Returns the `constructor` `MethodDefinition` on a class body, or `null` if
 * the class has none.
 */
export declare const findConstructor: (node: TSESTree.ClassDeclaration | TSESTree.ClassExpression) => TSESTree.MethodDefinition | null;
/**
 * Returns the string value of `node` when it's a plain string `Literal`, or
 * `null` otherwise (numeric/boolean literals, identifiers, template literals,
 * spreads, holes in a sparse array, etc.). Unlike `resolveStaticStringValue`,
 * this does no scope resolution — it only reads an inline string literal.
 */
export declare const getStringLiteralValue: (node: TSESTree.Node | null | undefined) => string | null;
/**
 * Returns the object literal passed as the argument at `index` (default `0`) of
 * `call`, or `null` when that argument is missing or isn't an inline
 * `ObjectExpression`. Does not resolve identifiers through scope — callers that
 * need that should pass the result of `resolveObjectExpression`.
 */
export declare const getCallArgumentObject: (call: TSESTree.CallExpression, index?: number) => TSESTree.ObjectExpression | null;
//# sourceMappingURL=ast.d.ts.map