/** * @packageDocumentation * Resolve constrained TypeScript types from ESTree nodes with resilient * fallbacks for partially mocked parser-services in tests. */ import type { TSESTree } from "@typescript-eslint/utils"; import type ts from "typescript"; type ConstrainedTypeParserServices = Readonly<{ esTreeNodeToTSNodeMap: Readonly<{ get: (key: Readonly) => ts.Node | undefined; }>; getTypeAtLocation?: (node: Readonly) => Readonly | ts.Type; program?: null | Readonly<{ getTypeChecker: () => ts.TypeChecker; }>; }>; /** * Resolve a node type using `getConstrainedTypeAtLocation` when available, then * fall back to checker + node-map based resolution. * * @param checker - Type checker used for fallback type lookups. * @param node - ESTree node whose type should be resolved. * @param parserServices - Parser services with node mapping and optional typed * helpers. * @param reason - Stable diagnostics reason fragment for safe-type wrappers. * * @returns The constrained type when resolvable; otherwise `undefined`. */ export declare const getConstrainedTypeAtLocationWithFallback: (checker: Readonly, node: Readonly, parserServices: ConstrainedTypeParserServices, reason: string) => ts.Type | undefined; export {}; //# sourceMappingURL=constrained-type-at-location.d.ts.map