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:
@@ -148,7 +148,7 @@ export async function showCalibration(deviceId: any) {
|
||||
|
||||
const preview = document.querySelector('.calibration-preview') as HTMLElement;
|
||||
const displayIndex = device.settings?.display_index ?? 0;
|
||||
const display = displays.find((d: any) => d.index === displayIndex);
|
||||
const display = (displays ?? []).find((d: any) => d.index === displayIndex);
|
||||
if (display && display.width && display.height) {
|
||||
preview.style.aspectRatio = `${display.width} / ${display.height}`;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user