From 555ecb043d18f081443bad32f06d797fb6d7bfe8 Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Thu, 22 Jan 2026 19:29:45 -0500 Subject: [PATCH] Fix: Resolve implicit any errors and missing properties in QR scanner and layout loads --- src/lib/element_qr_scanner_v2.svelte | 7 ++++--- src/lib/elements/element_input_files_tbl.svelte | 2 +- src/routes/core/not_used+layout.ts | 7 ++----- .../idaa/(idaa)/archives/[archive_id]/not_used+layout.ts | 4 ++-- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/lib/element_qr_scanner_v2.svelte b/src/lib/element_qr_scanner_v2.svelte index 1646cc4a..5dc603f6 100644 --- a/src/lib/element_qr_scanner_v2.svelte +++ b/src/lib/element_qr_scanner_v2.svelte @@ -114,7 +114,8 @@ debug_info = 'html5_qr_code not found. Creating new Html5Qrcode...'; html5_qr_code = new Html5Qrcode('qr_scanner_viewfinder', { - formatsToSupport: [Html5QrcodeSupportedFormats.QR_CODE] + formatsToSupport: [Html5QrcodeSupportedFormats.QR_CODE], + verbose: false }); } @@ -247,7 +248,7 @@ } // Callback function for QrcodeSuccessCallback (decodedText: string, result: Html5QrcodeResult) - function handle_qr_scan_success(decoded_text, decoded_result) { + function handle_qr_scan_success(decoded_text: string, decoded_result: any) { console.log( `*** handle_qr_scan_success() *** QR scanned = ${decoded_text}`, decoded_result @@ -268,7 +269,7 @@ // Callback function for QrcodeErrorCallback (errorMessage: string, error: Html5QrcodeError) // NOTE: Most of the time this is normal and not an actual error. It just did not find something to scan. - function handle_qr_scan_error(qr_error_message, qr_code_error) { + function handle_qr_scan_error(qr_error_message: string, qr_code_error: any) { // console.log('*** handle_qr_scan_error() ***'); if (qr_code_error.type) { diff --git a/src/lib/elements/element_input_files_tbl.svelte b/src/lib/elements/element_input_files_tbl.svelte index 0622f74a..cfcf6326 100644 --- a/src/lib/elements/element_input_files_tbl.svelte +++ b/src/lib/elements/element_input_files_tbl.svelte @@ -40,7 +40,7 @@ console.log('** Element Mounted: ** Element Input File'); }); - async function process_file_list(file_list) { + async function process_file_list(file_list: FileList) { console.log('*** process_file_list() ***'); file_list_status = 'processing'; diff --git a/src/routes/core/not_used+layout.ts b/src/routes/core/not_used+layout.ts index 6bf0ee58..6ae7d4a5 100644 --- a/src/routes/core/not_used+layout.ts +++ b/src/routes/core/not_used+layout.ts @@ -1,9 +1,6 @@ -/** @type {import('./$types').LayoutLoad} */ -// console.log(`ae_core root +layout.ts start`); +import type { LayoutLoad } from './$types'; -// import { core_func } from '$lib/ae_core_functions'; - -export async function load({ parent }) { +export const load: LayoutLoad = async ({ parent }) => { const log_lvl: number = 0; const data = await parent(); diff --git a/src/routes/idaa/(idaa)/archives/[archive_id]/not_used+layout.ts b/src/routes/idaa/(idaa)/archives/[archive_id]/not_used+layout.ts index 65d7274c..79cba60e 100644 --- a/src/routes/idaa/(idaa)/archives/[archive_id]/not_used+layout.ts +++ b/src/routes/idaa/(idaa)/archives/[archive_id]/not_used+layout.ts @@ -1,5 +1,5 @@ -/** @type {import('./$types').LayoutLoad} */ +import type { LayoutLoad } from './$types'; -export async function load({ params, parent }) { +export const load: LayoutLoad = async ({ params, parent }) => { // route }