We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ParserResult
1 parent 9e24f8a commit e148a0fCopy full SHA for e148a0f
src/parser.ts
@@ -6,14 +6,14 @@ export type InvalidInputError = {
6
readonly message: string
7
}
8
9
-export type Parser<Output> = (
10
- input: string,
11
-) => Either<InvalidInputError, Success<Output>>
+export type Parser<Output> = (input: string) => ParserResult<Output>
12
13
export type ParserWhichAlwaysSucceeds<Output> = (
14
input: string,
15
) => Right<Success<Output>>
16
+export type ParserResult<Output> = Either<InvalidInputError, Success<Output>>
+
17
export type Success<Output> = {
18
readonly remainingInput: string
19
readonly output: Output
0 commit comments