@khanacademy/perseus-core
Advanced tools
Comparing version 0.0.0-PR2244-20250214005942 to 0.0.0-PR2245-20250214164504
@@ -9,1 +9,2 @@ import { ErrorTrackingParseContext } from "../error-tracking-parse-context"; | ||
export declare function summonParsedValue<P extends Parser<any>>(): ParsedValue<P>; | ||
export declare function summon<T>(): T; |
@@ -16,2 +16,9 @@ export type Result<S, F> = Success<S> | Failure<F>; | ||
export declare function assertSuccess<S, F>(result: Result<S, F>): asserts result is Success<S>; | ||
/** | ||
* @returns a function that transforms the `detail` value of any Failure result | ||
* passed to it, and leaves Success results unchanged. `mapFailure` is curried | ||
* for easy composition with Array.map(), mu-lambda's pipe(), etc. | ||
* @param f the function to apply to Failure `detail`s. | ||
*/ | ||
export declare function mapFailure<S, DetailIn, DetailOut>(f: (detail: DetailIn) => DetailOut): (result: Result<S, DetailIn>) => Result<S, DetailOut>; | ||
export declare function all<S, F>(results: Array<Result<S, F>>, combineFailureDetails?: (a: F, b: F) => F): Result<S[], F>; |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "0.0.0-PR2244-20250214005942", | ||
"version": "0.0.0-PR2245-20250214164504", | ||
"publishConfig": { | ||
@@ -9,0 +9,0 @@ "access": "public" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1542525
156
12857