You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Declaration emit errors (TS5088) on anonymous cyclic types that 6.0 elided to any #64656
Errors on 7.1.0-dev.20261006.1. 6.0.3 emits /*elided*/ any at the cycle instead. (7.0.2 also emitted /*elided*/ any for both repros below when I tried it, in case that helps narrow anything down.)
Not sure whether the error is intended though! I can see the argument that an error is more honest than quietly writing any into a .d.ts, so if this is intentional, totally fair, but it might be worth calling out as a breaking change.
Additional information about the issue
Ran into this while moving ArkType's repo to TS 7. Here's what it looks like for an ArkType user exporting a scope with a recursive type:
import{scope}from"arktype"const$=scope({Node: {value: "number","next?": "Node"},List: {head: "Node"}})// 6.0.3: emits, with `next?: /*elided*/ any` at the cycle// 7.1.0-dev.20261006.1: error TS5088exportconsttypes=$.export()
There's no reasonable annotation for users to write here, since the whole point is that the type is inferred from the definitions, so in practice this is a breaking change for anyone shipping declarations from code like this.
Activity
ssalbdivad commentedon Oct 6, 2026
Mateusz Burzyński (@Andarist) mentioned it may be possible to emit the actual type using internal aliases like
_Nodehere.Would be fantastic if it is!