CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-io-ts

TypeScript runtime type system for IO decoding/encoding

72

1.14x
Overview
Eval results
Files

rubric.jsonevals/scenario-5/

{
  "context": "This criteria evaluates how well the engineer uses io-ts to implement mutually recursive type validators. The focus is on correctly using io-ts's recursion capabilities to define types that reference each other.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses t.recursion",
      "description": "Uses t.recursion() or io-ts's recursion function to define at least one of the mutually recursive types (Directory or File)",
      "max_score": 30
    },
    {
      "name": "Handles mutual recursion",
      "description": "Correctly handles the mutual recursion between Directory and File types, ensuring both types can reference each other through lazy evaluation",
      "max_score": 25
    },
    {
      "name": "Uses t.type",
      "description": "Uses t.type() to define the object structures for Directory and File with their required properties",
      "max_score": 15
    },
    {
      "name": "Uses t.literal",
      "description": "Uses t.literal() to define the type discriminator fields ('directory' and 'file')",
      "max_score": 10
    },
    {
      "name": "Uses t.array",
      "description": "Uses t.array() to define the contents field that holds an array of File objects",
      "max_score": 10
    },
    {
      "name": "Type extraction",
      "description": "Extracts TypeScript types from the io-ts validators using TypeOf or similar type utilities",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-io-ts

tile.json