tessl install tessl/npm-io-ts@2.2.0TypeScript 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%
{
"context": "This criteria evaluates how well the engineer uses io-ts union types to validate API responses that can be in one of three states (success, error, or loading). The focus is on proper usage of t.union() for discriminated unions and related io-ts APIs.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Union type creation",
"description": "Uses t.union() to create a union type that represents the three possible response states (success, error, loading)",
"max_score": 30
},
{
"name": "Tagged union pattern",
"description": "Uses t.literal() to create literal types for the status discriminator field (e.g., t.literal('success'), t.literal('error'), t.literal('loading'))",
"max_score": 20
},
{
"name": "Object type definitions",
"description": "Uses t.type() to define the structure of each response variant (success with data, error with error info, loading)",
"max_score": 20
},
{
"name": "Validation execution",
"description": "Uses the decode() method to validate the input response and returns the Either result",
"max_score": 15
},
{
"name": "Nested object validation",
"description": "Properly validates nested objects (user data with id and name, error object with code and message) using t.type() or similar combinators",
"max_score": 10
},
{
"name": "Type inference",
"description": "Leverages TypeScript type inference from the codec (e.g., using TypeOf to extract the validated type)",
"max_score": 5
}
]
}