```ts const t = type("string", "=>", (s) => s as any); // currently this fails because it is inferred as `(In: string) => any` attest<any>(t.infer); ``` This is due to the way morphs are extracted in distill while trying to preserve named types inferred from e.g. instanceof. If we can fix this without significant type performance costs, we should. That said, who wants to return `any` from their morphs anyways?
Activity
docs(repo): add the #1023 option comparison to issueAudit.md
docs(repo): update #1023 and arkregex status in issueAudit.md
fix(type): infer morphs returning any as any at every depth (#1023)
docs(repo): mark #1023 fixed in issueAudit.md
ssalbdivad commentedon Nov 18, 2026
Fixed in 3.0.0-beta.0 (#1728). Try it with
npm i arktype@next.