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 configuration validation system that validates configuration keys against a predefined set of allowed keys. The system should define a set of valid configuration options (e.g., "timeout", "retries", "maxConnections") and ensure that only keys from this set are accepted.
The system must accept only valid configuration keys from a predefined set of allowed options (at least 3 different valid keys).
The system must validate that configuration objects only contain keys from the allowed set.
{ setting: "timeout" }, it validates successfully @test@generates
/**
* Validates configuration keys against allowed options
* Returns Either with validation result
*/
export function validateConfigKey(key: unknown): unknown;
/**
* Validates a configuration object containing a key field
* Returns Either with validation result
*/
export function validateConfigObject(config: unknown): unknown;Provides runtime type validation support.
Provides functional programming utilities for Either types.