Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/result.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ interface BaseResult<T, E> extends Iterable<T extends Iterable<infer U> ? U : ne
expect(msg: string): T;

/**
* Returns the contained `Ok` value, if does not exist. Throws an error if it does.
* @param msg the message to throw if Ok value.
* Returns the contained `Err` value, if exists. Throws an error if not.
* @param msg the message to throw if no Err value.
*/
expectErr(msg: string): T;
expectErr(msg: string): E;

/**
* Returns the contained `Ok` value.
* Because this function may throw, its use is generally discouraged.
Expand Down