Fix: Resolve implicit any errors and missing properties in QR scanner and layout loads

This commit is contained in:
Scott Idem
2026-01-22 19:29:45 -05:00
parent b432a33cee
commit 555ecb043d
4 changed files with 9 additions and 11 deletions

View File

@@ -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) {

View File

@@ -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';

View File

@@ -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();

View File

@@ -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
}