Skip to content

Type-check .astro files with the TypeScript 7.1 content mapper - #202

Draft
kixelated wants to merge 2 commits into
mainfrom
quest/m0/astro-typecheck
Draft

kixelated wants to merge 2 commits into
mainfrom
quest/m0/astro-typecheck

Conversation

@kixelated

@kixelated kixelated commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

just check and CI now type-check the .astro files under src/ with @astrojs/ts-content-mapper:

  • typescript moves to ^7.1.0-beta (7.1 stable isn't out; latest is 7.0.2), per the quest's decision to adopt the beta now. The caret lets a lockfile refresh pick up 7.1 stable.
  • tsconfig.json registers the mapper under contentMappers, and check passes --runExternalCode.
  • moq/ stays excluded: the only submodule files checked are the ones src/ imports, the same set as before.

The existing .astro files surface no errors. I confirmed the mapper is live by injecting a frontmatter type error, a bad expression, a missing Astro prop, and an unknown prop on a Solid island; all four were reported. withastro/astro#18471 doesn't reproduce here on strict. MDX stays unchecked.

Blocked on upstream

TypeScript 7.1's DOM lib types more of WebTransport, and @moq/qmux's Session (imported via @moq/watch/@moq/publish) no longer satisfies it:

moq/js/qmux/src/session.ts(2068,6): error TS2416: Property 'congestionControl' in type 'Session' is not assignable to the same property in base type 'WebTransport'.

The fix is upstream in moq-dev/moq#6625. With that patch applied to the submodule, just check passes locally. CI here will fail until it merges; then this PR needs a submodule bump, and it stays a draft until then.

Verification

  • just fix, then just check (with the upstream patch applied to the submodule): passes, quest check ok.
  • Dev server: home, blog, and watch pages render.

Follow-ups

  • Move to TypeScript 7.1 stable when it ships.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

kixelated and others added 2 commits October 23, 2026 23:17
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Status: implementation done; blocked on moq-dev/moq#6625. CI fails only on the expected @moq/qmux congestionControl error from TypeScript 7.1's DOM lib. Next step after that merges: bump the moq submodule here, rerun CI, mark ready.

Decision for the maintainer: the upstream fix gives qmux Session reliability = "reliable-only" and an empty getStats() to complete the WebTransport interface under 7.1. Recommended, since it matches the W3C semantics for a WebSocket-carried session and stays compatible with 7.0.2.

(Written by Claude Opus 5.5)

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