@statechannels/client-api-schema > parseResponse

parseResponse() function

Validates a response against the API schema & returns the input cast to the correctly narrowed type.

Signature:

export declare function parseResponse(jsonBlob: object): StateChannelsResponse;

Parameters

ParameterTypeDescription
jsonBlobobjectA javascript object that might be a valid StateChannelsResponse

Returns:

StateChannelsResponse

The input, but with the correct type, if it is valid.

Last updated on by geoknee