当返回值取决于未标注的参数时,Tuple morph 会推断 `.infer` 为 `never`
作者: Bas950创建于 2026年6月8日更新于 2026年6月8日
import { scope } from "arktype"
// ❌ tuple morph, parameter NOT annotated, return DEPENDS on the parameter
// -> .infer (output) is never
bug: ["Base", "=>", (d) => d],
// ✅ same morph with the parameter annotated -> .infer = { text: string }
fixedByAnnotation: ["Base", "=>", (d: { text: string }) => d],
内容来源: arktypeio/arktype