fix: resolve all TypeScript strict null check errors

Fix ~68 pre-existing strict null errors across 13 feature modules.
Add non-null assertions for DOM element lookups, null coalescing for
optional values, and type guards for nullable properties. Zero tsc
errors now with --noEmit.
This commit is contained in:
2026-03-24 13:59:07 +03:00
parent c0d0d839dc
commit 1111ab7355
13 changed files with 85 additions and 75 deletions

View File

@@ -38,7 +38,7 @@ function _ensureSettingsCsptSelect() {
icon: ICON_TEMPLATE,
desc: '',
})),
placeholder: window.t ? t('palette.search') : 'Search...',
placeholder: t('palette.search'),
allowNone: true,
noneLabel: t('common.none_no_cspt'),
} as any);
@@ -443,7 +443,7 @@ export async function showSettings(deviceId: any) {
// Tags
if (_deviceTagsInput) _deviceTagsInput.destroy();
_deviceTagsInput = new TagInput(document.getElementById('device-tags-container'), {
placeholder: window.t ? t('tags.placeholder') : 'Add tag...'
placeholder: t('tags.placeholder'),
});
_deviceTagsInput.setValue(device.tags || []);