From 2d0565c72e3eb80209fc3645aad7e830b75e91f6 Mon Sep 17 00:00:00 2001 From: wood chen Date: Sat, 8 Feb 2025 01:57:51 +0800 Subject: [PATCH] Remove TypeScript type annotations in frontend price data handling --- main.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.ts b/main.ts index ad86d67..0cc60f6 100644 --- a/main.ts +++ b/main.ts @@ -534,7 +534,7 @@ const html = ` fetch('/api/prices') .then(response => response.json()) - .then((data: Price[]) => { + .then(data => { tbody.innerHTML = ''; if (!data || !Array.isArray(data)) { @@ -542,9 +542,9 @@ const html = ` return; } - data.forEach((price: Price) => { + data.forEach(price => { const tr = document.createElement('tr'); - const safePrice: Price = { + const safePrice = { ...price, input_ratio: price.input_ratio || 1, output_ratio: price.output_ratio || 1,