import { ASTNode } from "../types/ast.js"; import { Rule } from "eslint"; //#region src/utils/functype-detection.d.ts /** * Check if functype library is imported in the current file */ declare function hasFunctypeImport(context: Rule.RuleContext): boolean; /** * Enhanced functype imports tracking */ interface FunctypeImports { types: Set; functions: Set; all: Set; } /** * Get imported functype symbols from the current file */ declare function getFunctypeImports(context: Rule.RuleContext): FunctypeImports; /** * Legacy compatibility - returns the 'all' set */ declare function getFunctypeImportsLegacy(context: Rule.RuleContext): Set; /** * Check if a type reference is using functype types */ declare function isFunctypeType(node: ASTNode, functypeImports: FunctypeImports | Set): boolean; /** * Check if a call expression is using functype methods */ declare function isFunctypeCall(node: ASTNode, functypeImports: Set): boolean; /** * Check if current context is already using functype patterns appropriately */ declare function isAlreadyUsingFunctype(node: ASTNode, functypeImports: Set): boolean; /** * Check if a variable or parameter is typed with functype types */ declare function hasFunctypeTypeAnnotation(node: ASTNode, functypeImports: FunctypeImports | Set): boolean; /** * Check if a call expression is a Do notation call */ declare function isDoNotationCall(node: ASTNode, functypeImports: FunctypeImports): boolean; /** * Check if a call expression uses the $ helper function */ declare function isDollarHelper(node: ASTNode, functypeImports: FunctypeImports): boolean; /** * Check if current expression is inside a Do notation block */ declare function isInsideDoNotation(node: ASTNode, functypeImports: FunctypeImports): boolean; /** * Check if a method call is a chained method call on functype types */ declare function isChainedMethodCall(node: ASTNode, methodName: string): boolean; /** * Detect if code could benefit from Do notation */ declare function shouldUseDoNotation(node: ASTNode, functypeImports: FunctypeImports): { shouldUse: boolean; reason: "nested-checks" | "chained-flatmaps" | "mixed-monads" | "async-chains" | null; }; //#endregion export { FunctypeImports, getFunctypeImports, getFunctypeImportsLegacy, hasFunctypeImport, hasFunctypeTypeAnnotation, isAlreadyUsingFunctype, isChainedMethodCall, isDoNotationCall, isDollarHelper, isFunctypeCall, isFunctypeType, isInsideDoNotation, shouldUseDoNotation }; //# sourceMappingURL=functype-detection.d.ts.map