From b661a426a98a5ae7d5c4a885aff6a457bf8a77a6 Mon Sep 17 00:00:00 2001 From: Penny Liu Date: Mon, 2 Aug 2021 12:09:24 +0800 Subject: [PATCH] Typecast element to HTMLSelectElement `#type` is belong to the ``` --- src/app.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app.ts b/src/app.ts index 6bbeaed..976cd06 100644 --- a/src/app.ts +++ b/src/app.ts @@ -9,7 +9,7 @@ const form = document.querySelector('.new-item-form') as HTMLFormElement; console.log(form.children); // inputs -const type = document.querySelector('#type') as HTMLInputElement; +const type = document.querySelector('#type') as HTMLSelectElement; const tofrom = document.querySelector('#tofrom') as HTMLInputElement; const details = document.querySelector('#details') as HTMLInputElement; const amount = document.querySelector('#amount') as HTMLInputElement; @@ -23,4 +23,4 @@ form.addEventListener('submit', (e: Event) => { details.value, amount.valueAsNumber ); -}); \ No newline at end of file +});