Skip to content

Shallow cycle error on this[] #1406

Description

@ssalbdivad

This is inferred time but fails at runtime:

export const ApprovalConfigStepNodeValidator = type({
  key: "this[]",
});

Activity

  1. moved this from To do to Backlog in arktypeioon Apr 6, 2025
  2. added 3 commits that reference this issue on May 10, 2026
    7a6bb5a
    3990bd0
    3ca8878
  3. jonathan-ek commented on Jun 2, 2026

    @jonathan-ek

    @marko suggested the following workaround

    type Interesting = {
      name: string
      children: Interesting[]
    }
    
    const { Thing } = type.module({
      Thing: {
        name: "string",
        children: "Thing[]"
      }
    })
    
    const A = type.declare<Interesting>().type(Thing)
    

    Can confirm that this works.

  4. added a commit that references this issue on Oct 1, 2026
    1ee4923
  5. added a commit that references this issue on Oct 2, 2026
    e83417a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      Done (merged or closed)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions