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:
@@ -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 || []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user