From 9043c637c04424e2fa042f0f4a124a8eed8edc81 Mon Sep 17 00:00:00 2001 From: "Jaron (aider)" Date: Sat, 15 Feb 2025 12:09:39 -0600 Subject: [PATCH] refactor: Simplify hydration type inference in hydrate function --- src/services/hydrator.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/hydrator.ts b/src/services/hydrator.ts index f8afaf8..20d3ff9 100644 --- a/src/services/hydrator.ts +++ b/src/services/hydrator.ts @@ -27,12 +27,12 @@ export type Hydrated> = * * @throws Will throw an error if an expectation cannot be resolved. */ -export async function hydrate, K extends Array>( +export async function hydrate>( data: T, expectations: K, client: Client, api: API -): Promise ? Hydrated : Hydrated> { +): Promise> { // TODO: add clone trait. Make it a requirement for hydrateable objects. // Then clone the object and return the hydrated object. let hydrated: Hydrated;