@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
Parameter | Type | Description |
---|---|---|
jsonBlob | object | A javascript object that might be a valid StateChannelsRequest |
Returns:
The input, but with the correct type, if it is valid.