@statechannels/client-api-schema > parseRequest

parseRequest() function

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

Signature:

export declare function parseRequest(jsonBlob: object): StateChannelsRequest;

Parameters

ParameterTypeDescription
jsonBlobobjectA javascript object that might be a valid StateChannelsRequest

Returns:

StateChannelsRequest

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

Last updated on by geoknee