TypeScript runtime type system for IO decoding/encoding
72
A validator for handling API responses that can return different types of data based on the operation result.
@generates
/**
* Validates an API response that can be in one of three states:
* - Success: Contains user data
* - Error: Contains error information
* - Loading: Indicates operation in progress
*
* @param response - The API response object to validate
* @returns Either an array of validation errors or the validated response
*/
export function validateResponse(response: unknown): any;Provides runtime type validation with union type support.
@satisfied-by
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