feat: establish TypeScript-aware frontend tooling

This commit is contained in:
donghyeon-ka
2026-07-26 13:41:23 +09:00
parent 1a1747c737
commit 0fed35586a
41 changed files with 1086 additions and 125 deletions
@@ -0,0 +1,16 @@
import { describe, expect, it } from "vitest";
type Result<T, E> =
| Readonly<{ ok: true; value: T }>
| Readonly<{ ok: false; error: E }>;
function summarize(result: Result<number, string>): string {
return result.ok ? String(result.value) : result.error;
}
describe("TypeScript test tooling", () => {
it("type-checks and executes discriminated unions in the test project", () => {
expect(summarize({ ok: true, value: 42 })).toBe("42");
expect(summarize({ ok: false, error: "failed" })).toBe("failed");
});
});