From a151076fd72b629510e765df489c252ed09617ea Mon Sep 17 00:00:00 2001 From: Tom Mrazauskas Date: Fri, 15 Nov 2024 20:09:14 +0200 Subject: [PATCH] fix typos --- src/helpers.ts | 2 +- src/result.test.ts | 6 +++--- src/result.ts | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/helpers.ts b/src/helpers.ts index 1a6cf11..8465eda 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -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 diff --git a/src/result.test.ts b/src/result.test.ts index 6d4c79e..ac6db7a 100644 --- a/src/result.test.ts +++ b/src/result.test.ts @@ -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; } @@ -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(); @@ -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); diff --git a/src/result.ts b/src/result.ts index 55f465c..e98370e 100644 --- a/src/result.ts +++ b/src/result.ts @@ -54,13 +54,13 @@ type AccountForFunctionThrowing = */ export class AsyncResult extends Promise> { /** - * 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; @@ -595,13 +595,13 @@ export class Result { ) {} /** - * 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;