import * as ts from "typescript"; import type { FormSpecPlacement, SemanticCapability } from "./tag-registry.js"; export type FormSpecSemanticCapability = SemanticCapability; /** * Result of resolving a dotted FormSpec path target through a TypeScript type. */ export type ResolvedPathTargetType = { readonly kind: "resolved"; readonly type: ts.Type; } | { readonly kind: "missing-property"; readonly segment: string; } | { readonly kind: "unresolvable"; readonly type: ts.Type; }; /** * Collapses `T | null`, `T | undefined`, and `T | null | undefined` to `T`. * * Only collapses when exactly one non-nullish member remains — wider unions * (e.g. `A | B | null`) pass through unchanged. Used throughout the analysis * layer to normalize nullable fields before capability checks. */ export declare function stripNullishUnion(type: ts.Type): ts.Type; export declare function resolveDeclarationPlacement(node: ts.Node): FormSpecPlacement | null; export declare function getTypeSemanticCapabilities(type: ts.Type, checker: ts.TypeChecker): readonly SemanticCapability[]; export declare function hasTypeSemanticCapability(type: ts.Type, checker: ts.TypeChecker, capability: SemanticCapability): boolean; /** * Resolves a dotted FormSpec path target against a TypeScript type. * * Arrays are traversed through their item type so path-targets behave the same * way they do in the IR validator and cursor-context completion logic. */ export declare function resolvePathTargetType(type: ts.Type, checker: ts.TypeChecker, segments: readonly string[]): ResolvedPathTargetType; export declare function collectCompatiblePathTargets(type: ts.Type, checker: ts.TypeChecker, capability: SemanticCapability): readonly string[]; /** * Extracts addressable enum member values from a string literal union type * for use as `:member` target completions. */ export declare function getEnumMemberCompletions(type: ts.Type): readonly string[]; //# sourceMappingURL=ts-binding.d.ts.map