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 data transformation system that converts between internal and external representations while ensuring data integrity through round-trip validation. The system should handle configuration data that needs to be transformed for storage or transmission, then reliably reconstructed.
You need to implement a bidirectional transformation system with the following capabilities:
Create transformations for a user configuration object with these properties:
Implement the following test cases:
@generates
/**
* Internal representation of configuration
*/
export interface InternalConfig {
timestamp: Date;
isActive: boolean;
maxRetries: number;
timeout: number;
}
/**
* External representation of configuration
*/
export interface ExternalConfig {
timestamp: string;
status: "active" | "inactive";
maxRetries: number;
timeout: number;
}
/**
* Codec for bidirectional transformation between internal and external config
*/
export const ConfigCodec: any; // Type should support both encode and decode operationsProvides runtime type validation and bidirectional transformation capabilities.
Provides functional programming utilities including Either for error handling.