Skip to content

Fix noUncheckedIndexedAccess undefineds#106

Merged
WorldMaker merged 2 commits into
mainfrom
max/vivacious-muskox
Oct 18, 2025
Merged

Fix noUncheckedIndexedAccess undefineds#106
WorldMaker merged 2 commits into
mainfrom
max/vivacious-muskox

Conversation

@WorldMaker
Copy link
Copy Markdown
Owner

Vite default tsconfig apparently suggests this extra strictness flag.

(Semver patch version bump)

Reported as TS errors when consuming butterfloat with noUncheckedIndexedAccess compiler option enabled.
Fixes #104

Vite default tsconfig apparently suggests this extra strictness flag.

(Semver patch version bump)

Reported as TS errors when consuming butterfloat with `noUncheckedIndexedAccess` compiler option enabled.
Fixes #104
@WorldMaker WorldMaker requested a review from Copilot October 18, 2025 02:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Addresses TypeScript errors under the noUncheckedIndexedAccess compiler option by asserting non-null values where indexing/splitting could be flagged as possibly undefined. Also bumps package version for a patch release.

  • Add non-null assertions to array/object index accesses and split results in production and test code
  • Patch version bump to 1.6.5

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
static-dom.ts Add non-null assertions for namespace lookups and element/attribute names derived from split to satisfy noUncheckedIndexedAccess
static-dom.test.tsx Add non-null assertions in tests when indexing arrays of binds/selectors
stamp.test.tsx Add non-null assertions when destructuring from indexed arrays in tests
events.test.ts Add non-null assertion when reading events.click in tests
package.json Bump version to 1.6.5
jsr.json Bump version to 1.6.5

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread static-dom.ts Outdated
Comment thread static-dom.ts Outdated
Comment thread events.test.ts Outdated
@achou11
Copy link
Copy Markdown

achou11 commented Oct 18, 2025

Vite default tsconfig apparently suggests this extra strictness flag.

Just want to clarify that the usage of the additional strictness flags isn't something that's imposed by Vite, at least to my knowledge. I mentioned Vite in case it helped with trying to reproduce the issue but most of the TS configurations come from personal experience and or being informed via resources like https://tsconfig.guide/

@WorldMaker WorldMaker merged commit 4f9f63a into main Oct 18, 2025
3 checks passed
@WorldMaker WorldMaker deleted the max/vivacious-muskox branch October 18, 2025 03:10
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.

TS errors when consuming butterfloat with noUncheckedIndexedAccess compiler option enabled.

3 participants