import * as __ctHelpers from "commontools"; import { pattern, UI, VNode, } from "commontools"; // Simulates `any` leaking through a generic function (like generateObject) declare function fetchAny(): any; // Case 1: Explicit Output type overrides inferred `any` return export const TypedFromAny = pattern(({ prompt }) => { const result = fetchAny(); return result?.title || prompt || "Untitled"; }, { type: "object", properties: { prompt: { type: "string" } }, required: ["prompt"] } as const satisfies __ctHelpers.JSONSchema, { type: "string" } as const satisfies __ctHelpers.JSONSchema); // Case 2: { [UI]: VNode } Output type instead of { [UI]: any } type Entry = { name: string; }; export const TypedUIOutput = pattern(({ name }) => { return { [UI]: (