Repository navigation
Correct the prologue and chapter 01: tsc still emits on errors, and arithmetic on any is a number - #17
Merged
Conversation
JSX trims each line of a text block and joins the lines with one space.
The Chinese copy is wrapped across source lines throughout the course, so
it rendered with spaces between Chinese characters and around full-width
punctuation: 1,572 of them in 36 files.
- 1,548 line breaks are joined by a script that walks the TypeScript
syntax tree and touches only JSX text and JSX attribute strings, never
code samples, template literals or comments. Breaks next to Latin
letters, digits, expressions, "——" or operators keep their space.
- 24 more spaces go: 20 after full-width punctuation, 3 between Chinese
text and a tag whose text is Chinese, and one {" "} between a
full-width mark and Chinese text.
- test/zh-copy-spacing.test.ts, the check DataData and AlgoAlgo use,
scans every TSX file and fails on any new stray space; CLAUDE.md states
the rule.
Apart from the one {" "}, the diff changes nothing but whitespace. The
text every edited file renders differs from master only by deleted
spaces, each next to Chinese text, so the English copy is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rithmetic is number Prologue - tsc writes the .js even when it reports a type error (noEmitOnError is off, including in the tsconfig.json that tsc --init writes). The terminal comments, the tsc note and the local-run task no longer say the compiler refuses or produces nothing; the task now says it reports TS2322, exits non-zero and still rewrites order.js, and points to chapter 10. - The diff task describes what TypeScript 5.9's tsc --init really produces: "use strict", the exports line, the sourceMappingURL comment and the .d.ts/.map files. - "Every line of JavaScript is still valid" becomes valid syntax that the checker may still flag; not every error message has a suggestion; null also comes from APIs; the timeline quotes the full TS2551 message. Chapter 01 - The any example no longer contradicts the compiler: data.prise * 2 is a number, so the next line was an error (TS2339). It now reads a property, which really stays any, and the note, the callout and the quiz explanation say that arithmetic on any gives number. - The Chinese-only "95%" now says "most of the time", as the English does. Both chapters and the prologue's sidebar summary - Chinese copy in a formal register: no 炸, 坑, 吭声, 十万八千里, 人话, 认个脸 and similar; quiz titles read 本章测验 as on the sister sites; 悬停 instead of hover; 动手任务 instead of Labs; 注解 instead of 标注. - The ID-card and type-lens buttons in the chapter 01 visual expose aria-pressed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Oct 10, 2026
Merged
This branch was successfully deployed
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.
Branches from #9 (commit
2148ad8), so it can be merged before or after it, and independently of #10–#16.It touches the prologue (
app/page.tsx,app/home-viz.tsx,lib/home-data.tsx) and chapter 01 (app/types/page.tsxapart from theWIDEN_CONSTpreset that #14 owns,app/types/viz.tsx,lib/types-data.tsx). It also changes one string inlib/curriculum.ts: the prologue's Chinese essence, at line 55, far from thechapterByPathregion that #10 changes.Summary
Fixes from the 2026-10-09 content audit (
04-TSer-内容.md):tscrefuses to write output when there is a type error. The local-run task even asked the reader to "see the compiler refuse".order.jsanyway and exits with code 2. Chapter 10 and the finale say so.data.prise * 2is anumber, so the next linetotal.toUpperCase()is reported as TS2339. The callout and the quiz also said "a result computed from it" becomes any.tsc --initalso adds"use strict", anexportsline, a source-map comment and.d.ts/.mapfiles.Changes
.js.tscreports TS2322, exits non-zero and still rewritesorder.js, with a pointer tonoEmitOnErrorin chapter 10.document.querySelector.any.ts: it now readsconst price = data.prise;and thenprice.toUpperCase(). Both lines stay silent and fail only at run time, withCannot read properties of undefined (reading 'toUpperCase').number.lib/curriculum.ts, and a Chinese title that now matches the English one ("seven basic types").aria-pressedon.tp-wall-chipand.tp-lens-line.Verification
npx tsc --noEmit --incremental false: clean.npm test: 6 files, 38 tests pass. This includeszh-copy-spacing, and every rewritten Chinese paragraph is on one line.npm run build: succeeds.any.ts: compiled with the lab's worker and TypeScript 5.9.3, both language versions give 0 diagnostics, andlabelisany. The runtime message was checked in Node 22.order.jsrewritten, the extra diff lines) were verified with the realtsc5.9.3 and itstsc --initconfig during the audit.next start, both languages:🤖 Generated with Claude Code