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 proficiency in using io-ts Codec module for bidirectional transformations with round-trip guarantees. The focus is on proper use of codec composition, custom codec creation, and leveraging the Codec type's encode/decode methods to ensure decode(encode(x)) === x.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Codec module import",
"description": "Uses io-ts Codec module (e.g., import * as C from 'io-ts/Codec' or similar) rather than the legacy Type interface",
"max_score": 10
},
{
"name": "Date codec implementation",
"description": "Creates a custom codec for Date/ISO string transformation using C.make or similar, with proper encode (Date → string) and decode (string → Date) implementations",
"max_score": 20
},
{
"name": "Boolean/literal codec",
"description": "Creates codec for boolean to/from 'active'/'inactive' literals using C.make or similar, correctly mapping true→'active' and false→'inactive'",
"max_score": 20
},
{
"name": "Struct codec composition",
"description": "Uses C.struct or C.type to compose the configuration codec from individual field codecs",
"max_score": 15
},
{
"name": "Codec type annotation",
"description": "Properly types the ConfigCodec export using Codec.Codec<InternalConfig, ExternalConfig> or equivalent from io-ts",
"max_score": 10
},
{
"name": "Decode method usage",
"description": "Uses the codec's decode method to validate and transform external data, returning Either<DecodeError, InternalConfig>",
"max_score": 10
},
{
"name": "Encode method usage",
"description": "Uses the codec's encode method to transform internal data to external representation",
"max_score": 10
},
{
"name": "Validation error handling",
"description": "Properly handles validation errors from decode using Either (e.g., fold, isLeft, isRight) from fp-ts",
"max_score": 5
}
]
}