Repository navigation
Correct the finale's as answer and summaries, and fix three details in chapter 10 - #22
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>
…apter 10 Finale - Task 1's answer: a misspelled key under as is TS2352 (one field missing, one extra, so the types are not comparable), not "accepted"; the table now lists the real code for each of the nine cells, and the hint no longer says the table matches section 01 exactly. - The section 01 explanation, the traffic-light stance, the visual's summary, the key point and the quiz explanation describe as as a comparability check, as the "What as actually lets through" callout already did, instead of "no check at all". - satisfies on the fourth draft also reports TS2339; const total: number = 22 widens 22; the "7" experiment names the second draft; the TS2352 quote is complete and explains what "as unknown as" gives up; the hero allows for the constructs that generate code. - The two fill-in questions also accept single-quoted answers. Chapter 10 - The target note counts three steps, not four; TS5052 is an options error after which tsc exits non-zero, not a refusal to run; whole-file suppression is // @ts-nocheck, because @ts-ignore only covers the next line. Both chapters - 注解 instead of 标注, formal Chinese, quiz titles 本章测验 / Chapter quiz, and aria-pressed on the target and three-forms segmented buttons. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d7ff849a6e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for (const m of raw.matchAll(/(\S)( +)(\S)/g)) { | ||
| const a = m[1], b = m[3]; | ||
| const stray = (PUNCT.test(a) || (a === "…" && closesChinese(raw, m.index!))) && ZH.test(b) && b !== "—"; |
There was a problem hiding this comment.
Check ASCII punctuation in same-line spacing
The same-line scan only treats PUNCT (which contains CJK/full-width punctuation) and … as preceding punctuation, even though breakIsStray explicitly handles the ASCII , : ; ? ! characters used throughout this codebase. Consequently existing violations such as lib/type-magic-data.tsx:679 (比较, 是) and lib/generics-data.tsx:689 (例外, 绝大多数) pass the newly added test, so it does not enforce the spacing convention it claims to cover.
Useful? React with 👍 / 👎.
| <code>const total: number = 22</code> only widens the inferred{" "} | ||
| <code>22</code> to <code>number</code>; it tells the compiler | ||
| nothing new, and it makes the code longer and harder to change. |
There was a problem hiding this comment.
Don't call the widening annotation information-free
When readers compare these two declarations, const total = 22 has the literal type 22, while const total: number = 22 has type number (including in an emitted declaration). The sentence now acknowledges that observable widening and immediately says the annotation tells the compiler nothing new, which is self-contradictory and preserves the inaccurate lesson this change is intended to correct; the annotation explicitly communicates the desired wider type, even if that is often unnecessary.
Useful? React with 👍 / 👎.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Branches from #9 (commit
2148ad8), so it can be merged before or after it, and independently of #10–#21.It touches chapter 10 (
app/tsconfig/page.tsx,viz.tsx,lib/tsconfig-data.tsx) and the finale (app/mindset/page.tsx,viz.tsx,lib/mindset-data.tsx).Summary
Fixes from the 2026-10-09 content audit (
04-TSer-内容.md):asas "no check". These were the §01 explanation, the traffic-light stance, the visual's summary, the key point and the quiz explanation. They contradicted the chapter's own callout "What as actually lets through", which explains the comparability rule.'dark'and'oolong' | 'mango'. Keep quiz focus, announce verdicts, and accept IME and single-quote answers #13 also folds quotes when answers are compared, so this PR and Keep quiz focus, announce verdicts, and accept IME and single-quote answers #13 each fix it on their own.tscexits non-zero and still emits.@ts-ignoreat the top of a file does not silence the whole file. That is// @ts-nocheck.satisfieson the fourth draft also reports TS2339.const total: number = 22does tell the compiler something: it widens22tonumber.aria-pressedon the segmented buttons.Changes
assummaries: they now read "only checks that the types are comparable". The visual's summary marks it as 检查 △(只查可比较).const totalexample now says the annotation widens22tonumber.as unknown as Configgives up.// @ts-nocheck.aria-pressedonseg-btn.Verification
npx tsc --noEmit --incremental false: clean.npm test: 6 files, 38 tests pass, includingzh-copy-spacing.npm run build: succeeds.satisfies:TS1360plusTS2339."7": the full TS2352 text quoted here.// @ts-ignorestill reports the third line, and// @ts-nocheckreports nothing.tsc:--exactOptionalPropertyTypeswithoutstrictNullChecksgives TS5052 and exit code 2, and still writesout/a.js.next start, both languages:🤖 Generated with Claude Code