Repository navigation
Conversation
- Every component and view is now <script setup lang="ts"> with typed props (defineProps<...>), emits and slots; main, router, data and the Vite/ESLint configs are .ts - Strict tsconfig (via @vue/tsconfig) plus noUncheckedIndexedAccess and noUnused*; shared TimelineEvent/Member types in src/types.ts, route meta typed through vue-router's RouteMeta, mcsrvstat response typed - Icon names are a union derived from the SVG path map, so an unknown icon is a type error - Boolean props (alternate, continue, centered, progress) are real booleans; callers pass the bare attribute instead of the "true" string - `bun run build` type-checks with vue-tsc first; `bun run typecheck` runs it alone and CI runs it as its own step - ESLint uses @vue/eslint-config-typescript (typescript-eslint) TypeScript 6.0: TypeScript 7's native compiler has no JS API yet, which vue-tsc and typescript-eslint (<6.1) both need. Bugs the type checker found: - Framed bound a `classObject` that was never defined - Credits used `credits` as both the prop and the template ref name Also works around a vite-ssg bug: its duplicate check for the <link>s it adds never matches, so a CSS chunk the entry already links (Splash's, now that Rolldown splits the Vue runtime into a shared chunk) got a second non-CORS link and was downloaded twice. onPageRendered now keeps only the first link per URL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DxVDmLPux3Tx7RV1v4yznD
…t-faraday-ux7zgr-typescript
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.
4 of 4 (stacked on the SSG + GitHub Pages PR, so this diff shows only the TypeScript conversion). Retarget to
developonce the earlier PRs merge.What changed
<script setup lang="ts">, with typed props (defineProps<…>()), emits and slots.main, the router, the builder data and the Vite/ESLint configs are.tstoo.@vue/tsconfig) and addsnoUncheckedIndexedAccessandnoUnusedLocals/Parameters.src/types.ts.meta.titleis typed through vue-router'sRouteMeta.alternate,continue,centeredandprogressare now real boolean props. Templates pass the bare attribute instead of the string"true".bun run buildnow runsvue-tscfirst, andbun run typecheckruns it on its own. CI type-checks as a separate step.@vue/eslint-config-typescript(typescript-eslint).Why TypeScript 6.0 rather than 7: TypeScript 7's native compiler doesn't have a JS API yet. vue-tsc needs one, and typescript-eslint only supports
<6.1. Moving to 7 is a version bump once those tools catch up.Bugs the type checker found
Framed.vuebound aclassObjectthat was never defined.Credits.vueusedcreditsas both the prop name and the template ref name.vite-ssg workaround
vite-ssg's check for
<link>s it has already added never matches, because it queriesattrs.file, which is always undefined. In this build Rolldown moved the Vue runtime into a shared chunk (the JS is about 2 KB smaller overall, just split differently). As a result Splash's CSS got a second, non-CORS link and was downloaded twice, with a console warning.onPageRenderedinvite.config.tsnow keeps only the first stylesheet/modulepreload link per URL.Verification
vue-tsc,eslintand the SSG build all pass. The dev server serves.tsand.vuefiles./,/campus,/cluband a 404 URL are pixel-identical to the previous PR's build. The only exception is the randomly shuffled credits.Generated by Claude Code