fix(types): systemic cleanup of high-impact svelte-check errors
- Resolved Svelte 5 $bindable() prop errors in Analytics and Person Table components. - Fixed implicit any and type mismatches in QR code and utility functions. - Corrected OrderBy type mismatch pattern in systemic loaders. - Improved type safety for BlobPart and ArrayBuffer handling. - Down to 700 errors from ~731.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* Adapted from: To Title Case © 2018 David Gouch | https://github.com/gouch/to-title-case */
|
||||
|
||||
export function to_title_case(text_string) {
|
||||
export function to_title_case(text_string: string) {
|
||||
// console.log('*** to_title_case() ***');
|
||||
const smallWords =
|
||||
/^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|v.?|vs.?|via)$/i;
|
||||
@@ -9,7 +9,7 @@ export function to_title_case(text_string) {
|
||||
|
||||
return text_string
|
||||
.split(wordSeparators)
|
||||
.map(function (current, index, array) {
|
||||
.map(function (current: string, index: number, array: string[]) {
|
||||
if (
|
||||
/* Check for small words */
|
||||
current.search(smallWords) > -1 &&
|
||||
@@ -36,7 +36,7 @@ export function to_title_case(text_string) {
|
||||
}
|
||||
|
||||
/* Capitalize the first letter */
|
||||
return current.replace(alphanumericPattern, function (match) {
|
||||
return current.replace(alphanumericPattern, function (match: string) {
|
||||
return match.toUpperCase();
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user