Skip to content

feat(ts): add TypeScript 1:1 port of lessons s01–s11, s13–s15 - #568

Open
suosui wants to merge 1 commit into
shareAI-lab:mainfrom
suosui:feat/typescript-port
Open

suosui wants to merge 1 commit into
shareAI-lab:mainfrom
suosui:feat/typescript-port

Conversation

@suosui

@suosui suosui commented Sep 11, 2026

Copy link
Copy Markdown

What

A line-by-line TypeScript port of the Python lessons, living in a single top-level ts/ directory, meant to be read side by side with the originals.

  • 14 code.ts files (~11.6k lines) mirroring sNN_topic/code.py
  • ts/README.md documents the Python→TypeScript naming map and the 27 deliberate divergences (no **kwargs, splice for in-place list replacement, fast-glob instead of glob.glob, readline/promises for input(), …)
  • tsc --noEmit passes under strict
  • s12 (cron scheduler), s16 and s17 are not ported
  • Root .gitignore gains node_modules/ so ts/node_modules/ stays out

Why this doesn't expand the teaching scope

The Python chapters remain the canonical course. Nothing under sNN_topic/ is touched, no chapter README changes, and no chapter gains or loses a concept. The port is additive and self-contained — deleting ts/ returns the repo to its exact current state.

Where the two languages genuinely cannot be 1:1 (Python's **kwargs, pathlib.is_relative_to, glob.glob(recursive=True)), ts/README.md names the divergence and explains it rather than silently papering over it. The intent is that the gap itself is instructive.

Honest caveats

This PR is not tied to an issue, which CONTRIBUTING lists as grounds for closing without detailed review. I'm opening it directly because the artifact is easier to judge than a description of it — but I fully understand if you'd rather I file an issue first and close this. Say the word and I'll do that instead.

Adding a second language is a structural addition, so it's reasonable to not want it at all. A "no thanks, the repo is Python-only by design" is a completely fine outcome and I won't re-litigate it.

Three-language README sync (CONTRIBUTING #3) does not apply here: no chapter README is modified. If you'd want ts/README.md itself mirrored into EN/JA before this is mergeable, tell me and I'll add them.

AI assistance disclosure

Written with Claude Code. I have read the port and stand behind it.

🤖 Generated with Claude Code

A line-by-line TypeScript port of the Python lessons, meant to be read
side by side with them. The Python chapters remain the canonical course;
nothing in the teaching structure changes.

- 14 `code.ts` files (~11.6k lines) mirroring `sNN_topic/code.py`
- `ts/README.md` documents the Python->TypeScript naming map and the
  27 deliberate divergences (no `**kwargs`, `splice` for in-place list
  replacement, `fast-glob` instead of `glob.glob`, etc.)
- `tsc --noEmit` passes under `strict`
- s12 (cron scheduler), s16 and s17 are not ported

The root `.gitignore` gains `node_modules/` so `ts/node_modules/` stays out.

AI assistance: written with Claude Code; I have read and stand behind it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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