From 136aca1201de92ec7dbab329f2a8556bfe842fc5 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 10 Sep 2026 08:40:09 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20[code=20health]=20Remove=20"as?= =?UTF-8?q?=20any"=20usage=20in=20types=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed the use of `as any` for mocking the `Unit` interface in `src/engine/types.test.ts` by explicitly typing the object as `Unit`. Co-authored-by: Horizontal42 <75383519+Horizontal42@users.noreply.github.com> --- src/engine/types.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/types.test.ts b/src/engine/types.test.ts index 69dff10..e16874d 100644 --- a/src/engine/types.test.ts +++ b/src/engine/types.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from "vitest"; -import { qty, pct, Decimal } from "./types"; +import { qty, pct, Decimal, Unit } from "./types"; describe("types", () => { describe("qty", () => { @@ -13,7 +13,7 @@ describe("types", () => { }); it("creates a quantity with all arguments provided", () => { - const mockUnit = { id: "meter", dimension: "length", ratio: new Decimal(1), format: "m" } as any; + const mockUnit: Unit = { id: "meter", dimension: "length", ratio: new Decimal(1), format: "m" }; const result = qty("3.14", mockUnit, "hex"); expect(result.kind).toBe("quantity"); expect(result.value).toBeInstanceOf(Decimal);