Skip to content

Chore/strict mode cleanup#14

Merged
wormeyman merged 2 commits into
wormeyman-space-age-supportfrom
chore/strict-mode-cleanup
Jul 9, 2026
Merged

Chore/strict mode cleanup#14
wormeyman merged 2 commits into
wormeyman-space-age-supportfrom
chore/strict-mode-cleanup

Conversation

@wormeyman

Copy link
Copy Markdown
Owner

No description provided.

wormeyman and others added 2 commits July 8, 2026 14:19
First increment of the incremental strict-mode migration. Enable the strict
sub-flags that cost zero errors today, so they lock against regressions while
the expensive flags are cleaned up separately:
- noImplicitThis, alwaysStrict, useUnknownInCatchVariables, strictBindCallApply

Also fix 2 pre-existing (ungated) website type errors: settingsPane.ts read
dat.gui's internal __min/__max off GUIController, which the published types
don't expose - now via a localized documented cast.

All three packages type-check at 0 errors; editor gate stays at baseline 0;
13 unit tests pass. Remaining before `strict: true`: strictNullChecks (~784),
noImplicitAny (~77), strictFunctionTypes (~4), strictPropertyInitialization (~1).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016Ub67HS5zocuDwwKDajBgS
Second increment of the incremental strict-mode migration. strictFunctionTypes
disables method/function-parameter bivariance, which surfaced 6 sites:

- BlueprintContainer pointerdown: pressButton was typed for a DOM PointerEvent
  but received a Pixi FederatedPointerEvent (bivariance hid the mismatch). Now
  pass e.nativeEvent, and bind the handler once so the destroy-time
  removeEventListener actually matches - previously a fresh .bind() meant the
  listener was never removed (leak). (runtime behavior change)
- History.Transaction.push: made generic in V so a concrete Action<V> is
  accepted; widen to Action<unknown> once internally for heterogeneous storage.
- WireConnections: annotate reduce<number> (accumulator was inferred to the
  0|1|2|3 element union).
- bpString: annotate new Promise<URL> so the .then callback param typechecks.

editor/website/worker all type-check at 0; gate at baseline 0; 13 unit tests
pass; lint/format clean. Remaining before `strict: true`: strictNullChecks
(~784), noImplicitAny (~77), strictPropertyInitialization (~1, needs
strictNullChecks).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016Ub67HS5zocuDwwKDajBgS
@wormeyman
wormeyman merged commit 6cc3977 into wormeyman-space-age-support Jul 9, 2026
6 checks passed
@wormeyman
wormeyman deleted the chore/strict-mode-cleanup branch July 9, 2026 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant