introduce the satisfies operator in the index-signatures theory - #352
Merged
Conversation
The theme example used `satisfies` while the operator was never explained anywhere in the course — a grep over modules found it only in this lesson. Added a short paragraph before the example: what satisfies does, how it differs from a type annotation (which would widen palette.primary to the union and make spacing unknown) and from an `as` assertion (which replaces the type the same way, but takes our word for the conformance), plus a link to the official TypeScript docs. Every claim about the resulting types was verified with tsc. The example itself is unchanged. Also added the missing trailing newline to the en file (MD047). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
fey
force-pushed
the
fix/278-satisfies-explanation
branch
from
August 5, 2026 15:25
3d3c1c0 to
981581e
Compare
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.
Closes #278
Пример с темой оформления в уроке «Индексные сигнатуры» использует
satisfies, а сам оператор в курсе нигде не объясняется — grep поmodulesдаёт вхождения только в этом уроке.Перед примером добавлен абзац: что делает
satisfies, чем отличается от аннотации типа (она бы расширилаprimaryдо'red' | 'green' | 'blue', аspacingсделала быunknown) и отas(просто отключает проверку), плюс ссылка на официальную документацию TypeScript. Оба утверждения про итоговые типы провереныtsc.Сам пример не менялся. Заодно добавлен отсутствовавший перевод строки в конце en-файла (MD047).
🤖 Generated with Claude Code