Fix: Resolve implicit any errors and missing properties in QR scanner and layout loads
This commit is contained in:
@@ -114,7 +114,8 @@
|
|||||||
debug_info = 'html5_qr_code not found. Creating new Html5Qrcode...';
|
debug_info = 'html5_qr_code not found. Creating new Html5Qrcode...';
|
||||||
|
|
||||||
html5_qr_code = new Html5Qrcode('qr_scanner_viewfinder', {
|
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)
|
// 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(
|
console.log(
|
||||||
`*** handle_qr_scan_success() *** QR scanned = ${decoded_text}`,
|
`*** handle_qr_scan_success() *** QR scanned = ${decoded_text}`,
|
||||||
decoded_result
|
decoded_result
|
||||||
@@ -268,7 +269,7 @@
|
|||||||
|
|
||||||
// Callback function for QrcodeErrorCallback (errorMessage: string, error: Html5QrcodeError)
|
// 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.
|
// 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() ***');
|
// console.log('*** handle_qr_scan_error() ***');
|
||||||
|
|
||||||
if (qr_code_error.type) {
|
if (qr_code_error.type) {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
console.log('** Element Mounted: ** Element Input File');
|
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() ***');
|
console.log('*** process_file_list() ***');
|
||||||
|
|
||||||
file_list_status = 'processing';
|
file_list_status = 'processing';
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
/** @type {import('./$types').LayoutLoad} */
|
import type { LayoutLoad } from './$types';
|
||||||
// console.log(`ae_core root +layout.ts start`);
|
|
||||||
|
|
||||||
// import { core_func } from '$lib/ae_core_functions';
|
export const load: LayoutLoad = async ({ parent }) => {
|
||||||
|
|
||||||
export async function load({ parent }) {
|
|
||||||
const log_lvl: number = 0;
|
const log_lvl: number = 0;
|
||||||
|
|
||||||
const data = await parent();
|
const data = await parent();
|
||||||
|
|||||||
@@ -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
|
// route
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user