CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-io-ts

tessl install tessl/npm-io-ts@2.2.0

TypeScript runtime type system for IO decoding/encoding

Agent Success

Agent success rate when using this tile

72%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.14x

Baseline

Agent success rate without this tile

63%

rubric.jsonevals/scenario-5/

{
  "context": "This evaluation assesses how well the engineer uses io-ts keyof functionality to create type-safe configuration key validators. The focus is on proper usage of t.keyof() to derive validators from object keys and integration with io-ts validation patterns.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses t.keyof",
      "description": "Uses t.keyof() to create a codec that validates against a predefined set of object keys (e.g., t.keyof({ timeout: null, retries: null, maxConnections: null }))",
      "max_score": 30
    },
    {
      "name": "Defines allowed keys",
      "description": "Defines an object or type containing at least 3 allowed configuration keys that serve as the basis for the keyof validator",
      "max_score": 15
    },
    {
      "name": "Single key validation",
      "description": "Implements validateConfigKey function that uses the keyof codec to validate individual configuration key strings using the .decode() method",
      "max_score": 20
    },
    {
      "name": "Object validation",
      "description": "Implements validateConfigObject function that validates objects containing a field with a configuration key, using t.type() or similar to compose the keyof validator with object validation",
      "max_score": 20
    },
    {
      "name": "Returns Either types",
      "description": "Both validation functions return Either types (from fp-ts) as the result of decode operations, preserving the Either<Errors, A> return type for proper error handling",
      "max_score": 15
    }
  ]
}

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/io-ts@2.2.x
tile.json