Repository navigation
build(srcts): Turn on TypeScript strict mode - #154
Merged
Merged
Conversation
Fix the 40 errors strict mode reports: - Type the untyped locals and callback parameters. - Return `T | undefined` from StatusArr.remove()/last() and the Node wrappers, and use `?.` where the last status may be missing. - Walk the ancestor and descendant ids without reassigning a `string | null` variable. - Mark GraphAtStep fields set by its init methods with `!`. - Read the timeline position from the native mouse event. - Replace utils/ArrayHelper.ts with Array#flatMap and utils/queryString.ts with URLSearchParams.
schloerke
added this pull request to stack #153
October 20, 2026 18:07
This was referenced Oct 20, 2026
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.
Turns on
strictintsconfig.jsonand fixes the 40 errors it reports. Most are missing types on local variables and callback parameters, and functions that said they always return a value when they can returnundefined.StatusArr.last()is one example: a caller read.actionfrom it with no check. Fields thatGraphAtStepfills in from its init methods are marked with!. Two small helpers became standard library calls:utils/ArrayHelper.tsis nowArray#flatMap, andutils/queryString.tsis nowURLSearchParams. The timeline now gets the click position from the native mouse event.I checked it by loading the
mainbundle and this bundle in Chrome and doing the same 18 things in each: every nav button, the arrow keys, Home and End, a click on the timeline, and a search. I also clicked and double-clicked a node and the background. The step, the node and edge counts, the log entry text, and the sticky and filter state matched every time, and neither page threw an error.no-explicit-anyis still off, so theanytypes left over from Flow'sObjectare not checked yet. The docs (AGENTS.md,memory-bank/jsBuild.md,memory-bank/viewerUi.md) are updated to match.