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%
Build a runtime type validator for a simplified file system structure where directories can contain files, and files reference their parent directories. This creates a mutually recursive relationship between the two types.
Create runtime validators for two interdependent types:
Directory: An object with:
type: Always the literal value "directory"name: A stringcontents: An array of File objects (can be empty)File: An object with:
type: Always the literal value "file"name: A stringparentDir: A Directory objectYour validators should:
Provides runtime type validation and decoding capabilities.
@satisfied-by