Skip to content

Latest commit

 

History

History
24 lines (14 loc) · 833 Bytes

prsc.streamingoptional.md

File metadata and controls

24 lines (14 loc) · 833 Bytes

Home > prsc > streamingOptional

streamingOptional() function

Creates a StreamingParser that tries to apply the given parser optionally. It only yields the values produced by the inner parser if it matches successfully, and does not yield anything otherwise.

Signature:

export declare function streamingOptional<T>(parser: StreamingParser<T>): StreamingParser<T>;

Parameters

Parameter Type Description
parser StreamingParser<T> StreamingParser to attempt to apply

Returns:

StreamingParser<T>