Severity: high | Confidence: confirmed | Area: type-safety | Source: codebase review 2026-06-30, finding TS-01
Problem
Neither tsconfig.json nor any extended config (src/tsconfig.app.json, src/tsconfig.spec.json) enables strict, strictNullChecks, noImplicitAny, or strictPropertyInitialization. The only strictness options present are Angular-specific template checks (strictTemplates and strictInjectionParameters). As a result, approximately 65 non-test declarations annotate a non-nullable type such as string or number while being initialised to null — for example let currentValue: string = null and private serverEndpoint: string = null. TypeScript silently accepts these, so the annotations actively misrepresent the runtime state: a variable typed string legitimately holds null, and every downstream operation that trusts the annotation (string methods, arithmetic, comparisons) can fail at runtime without any compile-time warning.
Impact
In a marine dashboard context, Signal K data paths frequently emit null on timeout, sensor loss, or initialisation. Without strictNullChecks, the type system provides zero protection at those boundaries: null values flow through code annotated as non-nullable, reaching operations that assume a valid string or number, which can produce silent NaN results, TypeError exceptions, or corrupt display values. For a fork targeting long-term reliability in a safety-relevant marine environment, enabling strict null checking would surface real latent bugs mechanically rather than requiring manual audit.
Affected code
tsconfig.json:1-26
src/tsconfig.app.json
src/tsconfig.spec.json
src/app/core/services/data.service.ts:247-248
src/app/core/services/storage.service.ts:39-43
src/app/core/services/signalk-delta.service.ts:58
src/app/widgets/minichart/minichart.component.ts:39-48
Suggested direction
Enable strictNullChecks incrementally: introduce a tsconfig.strict.json that extends the base config and enables strictNullChecks, wire it into CI as a ratchet (fail on regression, do not require 100% compliance on day one), then work through the ~65 lying annotations changing them to proper union types (string | null, number | null, etc.). Once that is clean, enable the remaining strict flags and add noImplicitReturns and noFallthroughCasesInSwitch. This approach is largely mechanical and surfaces real data-flow bugs rather than introducing new behaviour.
Verification
Verified against the codebase: all four cited = null declarations confirmed verbatim; repo-wide grep of all tsconfig*.json and angular.json found only strictTemplates and strictInjectionParameters — no strict, strictNullChecks, noImplicitAny, or strictPropertyInitialization anywhere (confidence: confirmed).
Severity: high | Confidence: confirmed | Area: type-safety | Source: codebase review 2026-06-30, finding
TS-01Problem
Neither
tsconfig.jsonnor any extended config (src/tsconfig.app.json,src/tsconfig.spec.json) enablesstrict,strictNullChecks,noImplicitAny, orstrictPropertyInitialization. The only strictness options present are Angular-specific template checks (strictTemplatesandstrictInjectionParameters). As a result, approximately 65 non-test declarations annotate a non-nullable type such asstringornumberwhile being initialised tonull— for examplelet currentValue: string = nullandprivate serverEndpoint: string = null. TypeScript silently accepts these, so the annotations actively misrepresent the runtime state: a variable typedstringlegitimately holdsnull, and every downstream operation that trusts the annotation (string methods, arithmetic, comparisons) can fail at runtime without any compile-time warning.Impact
In a marine dashboard context, Signal K data paths frequently emit
nullon timeout, sensor loss, or initialisation. WithoutstrictNullChecks, the type system provides zero protection at those boundaries: null values flow through code annotated as non-nullable, reaching operations that assume a valid string or number, which can produce silentNaNresults,TypeErrorexceptions, or corrupt display values. For a fork targeting long-term reliability in a safety-relevant marine environment, enabling strict null checking would surface real latent bugs mechanically rather than requiring manual audit.Affected code
tsconfig.json:1-26src/tsconfig.app.jsonsrc/tsconfig.spec.jsonsrc/app/core/services/data.service.ts:247-248src/app/core/services/storage.service.ts:39-43src/app/core/services/signalk-delta.service.ts:58src/app/widgets/minichart/minichart.component.ts:39-48Suggested direction
Enable
strictNullChecksincrementally: introduce atsconfig.strict.jsonthat extends the base config and enablesstrictNullChecks, wire it into CI as a ratchet (fail on regression, do not require 100% compliance on day one), then work through the ~65 lying annotations changing them to proper union types (string | null,number | null, etc.). Once that is clean, enable the remainingstrictflags and addnoImplicitReturnsandnoFallthroughCasesInSwitch. This approach is largely mechanical and surfaces real data-flow bugs rather than introducing new behaviour.Verification
Verified against the codebase: all four cited
= nulldeclarations confirmed verbatim; repo-wide grep of alltsconfig*.jsonandangular.jsonfound onlystrictTemplatesandstrictInjectionParameters— nostrict,strictNullChecks,noImplicitAny, orstrictPropertyInitializationanywhere (confidence: confirmed).