TypeScript runtime type system for IO decoding/encoding
72
{
"context": "This criteria evaluates how effectively an engineer uses io-ts to build and compose nested type validators for a complex user profile structure. The focus is on proper usage of io-ts combinators to create deeply nested validation schemas with objects, arrays, and union types.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Root codec creation",
"description": "Uses t.type() or t.interface() to define the root UserProfile codec with all four top-level properties (user, settings, addresses, socialConnections)",
"max_score": 10
},
{
"name": "User object codec",
"description": "Correctly defines the user object using t.type() with id as t.number, username as t.string, and email as t.string",
"max_score": 10
},
{
"name": "Settings nested structure",
"description": "Properly composes the settings object with nested preferences and privacy objects using t.type() for both levels",
"max_score": 15
},
{
"name": "Literal union types",
"description": "Uses t.union() with t.literal() to define the theme field as union of 'light' and 'dark', and platform field as union of 'twitter', 'linkedin', and 'github'",
"max_score": 15
},
{
"name": "Array codecs",
"description": "Uses t.array() to define both the addresses array and socialConnections array with properly typed element codecs",
"max_score": 10
},
{
"name": "Address nested codec",
"description": "Defines address objects with t.type() containing string fields (street, city, zipCode) and a nested coordinates object with latitude and longitude as t.number",
"max_score": 15
},
{
"name": "Social connection codec",
"description": "Defines social connection objects with t.type() containing the platform union type and a nested profile object with handle (string) and verified (boolean)",
"max_score": 10
},
{
"name": "Validation execution",
"description": "Calls the codec's decode() method with the input data to perform validation",
"max_score": 5
},
{
"name": "Result handling",
"description": "Properly handles the Either result from decode() using fp-ts utilities (fold, isLeft, isRight) or pattern matching to return the ValidationResult type",
"max_score": 10
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-io-tsdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10