Skip to content

Commit

Permalink
Merge pull request #11 from mrazauskas/fix-typos
Browse files Browse the repository at this point in the history
fix few typos
  • Loading branch information
everweij authored Nov 16, 2024
2 parents 70be631 + a151076 commit d24bdfb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function isAsyncFn(fn: AnyFunction): fn is AnyAsyncFunction {
}

/**
* Utlity function to assert that a case is unreachable
* Utility function to assert that a case is unreachable
* @param value the value which to check for exhaustiveness
*
* @example
Expand Down
6 changes: 3 additions & 3 deletions src/result.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ describe("Result", () => {
expect(result.error).toBeInstanceOf(CustomError);
});

it("returns an asyc-function that executes a given async-function and returns the successful outcome in a async-result", async () => {
it("returns an async-function that executes a given async-function and returns the successful outcome in a async-result", async () => {
async function sum(a: number, b: number) {
return a + b;
}
Expand All @@ -271,7 +271,7 @@ describe("Result", () => {
expect(result.value).toBe(3);
});

it("returns an asyc-function that executes a given async-function and returns the failed outcome in a async-result", async () => {
it("returns an async-function that executes a given async-function and returns the failed outcome in a async-result", async () => {
async function sum(a: number, b: number) {
throw new CustomError();

Expand Down Expand Up @@ -342,7 +342,7 @@ describe("Result", () => {
expect(result.value).toEqual(["a", "b", "c"]);
});

it("takes a single succesful async-result and combines it into one successful async-result", async () => {
it("takes a single successful async-result and combines it into one successful async-result", async () => {
const asyncResult = Result.try(async () => "some value");

const asyncAllResult = Result.allCatching(asyncResult);
Expand Down
8 changes: 4 additions & 4 deletions src/result.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ type AccountForFunctionThrowing<Items extends any[]> =
*/
export class AsyncResult<Value, Err> extends Promise<Result<Value, Err>> {
/**
* Utiltity getter to infer the value type of the result.
* Utility getter to infer the value type of the result.
* Note: this getter does not hold any value, it's only used for type inference.
*/
declare $inferValue: Value;

/**
* Utiltity getter to infer the error type of the result.
* Utility getter to infer the error type of the result.
* Note: this getter does not hold any value, it's only used for type inference.
*/
declare $inferError: Err;
Expand Down Expand Up @@ -595,13 +595,13 @@ export class Result<Value, Err> {
) {}

/**
* Utiltity getter to infer the value type of the result.
* Utility getter to infer the value type of the result.
* Note: this getter does not hold any value, it's only used for type inference.
*/
declare $inferValue: Value;

/**
* Utiltity getter to infer the error type of the result.
* Utility getter to infer the error type of the result.
* Note: this getter does not hold any value, it's only used for type inference.
*/
declare $inferError: Err;
Expand Down

0 comments on commit d24bdfb

Please sign in to comment.