Chore/strict mode cleanup#14
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.