@statechannels/client-api-schema > parseNotification
parseNotification() function
Validates a notification against the API schema & returns the input cast to the correctly narrowed type.
Signature:
export declare function parseNotification(jsonBlob: object): StateChannelsNotification;
Parameters
Parameter | Type | Description |
---|---|---|
jsonBlob | object | A javascript object that might be a valid StateChannelsNotification |
Returns:
The input, but with the correct type, if it is valid.