The page's type-check does not catch nulls #236

Closed
opened 2026-10-14 08:56:58 -07:00 by rays · 1 comment
Owner

After #235 the page type-checks with noImplicitAny, but strictNullChecks is off (200 errors when tried, before #235's types) and returns any, so a lookup that finds nothing, or an API field that is null, is not caught. Typing (an element type, maybe null) changes how every lookup is written, so it is its own piece of work.

After #235 the page type-checks with noImplicitAny, but strictNullChecks is off (200 errors when tried, before #235's types) and $ returns any, so a lookup that finds nothing, or an API field that is null, is not caught. Typing $ (an element type, maybe null) changes how every lookup is written, so it is its own piece of work.
rays added the enhancement label 2026-10-14 08:56:58 -07:00
Author
Owner

Done in 60007d4, deployed in ipx-web 1.0.2-dev: tsconfig.json is strict: true. $ returns a typed element (assumed present; the page check proves the load-time ones exist, a maybe-missing one is $(...)?.); 122 lookups are typed from their tag. strictNullChecks found no bug: its 94 places were already handled at run time, and now say so. tsc, page-smoke, page-unit, native-bridge and all 74 browser tests pass.

Done in 60007d4, deployed in ipx-web 1.0.2-dev: tsconfig.json is strict: true. $<T> returns a typed element (assumed present; the page check proves the load-time ones exist, a maybe-missing one is $(...)?.); 122 lookups are typed from their tag. strictNullChecks found no bug: its 94 places were already handled at run time, and now say so. tsc, page-smoke, page-unit, native-bridge and all 74 browser tests pass.
rays closed this issue 2026-10-14 10:51:00 -07:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rays/ipx#236