Skip to content

introduce the satisfies operator in the index-signatures theory - #352

Merged
fey merged 1 commit into
mainfrom
fix/278-satisfies-explanation
Aug 5, 2026
Merged

introduce the satisfies operator in the index-signatures theory#352
fey merged 1 commit into
mainfrom
fix/278-satisfies-explanation

Conversation

@fey

@fey fey commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Closes #278

Пример с темой оформления в уроке «Индексные сигнатуры» использует satisfies, а сам оператор в курсе нигде не объясняется — grep по modules даёт вхождения только в этом уроке.

Перед примером добавлен абзац: что делает satisfies, чем отличается от аннотации типа (она бы расширила primary до 'red' | 'green' | 'blue', а spacing сделала бы unknown) и от as (просто отключает проверку), плюс ссылка на официальную документацию TypeScript. Оба утверждения про итоговые типы проверены tsc.

Сам пример не менялся. Заодно добавлен отсутствовавший перевод строки в конце en-файла (MD047).

🤖 Generated with Claude Code

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
fey force-pushed the fix/278-satisfies-explanation branch from 3d3c1c0 to 981581e Compare August 5, 2026 15:25
@fey
fey merged commit dfcfc83 into main Aug 5, 2026
2 checks passed
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.

Добавить информацию про satisfies в курс по TypeSctipt

1 participant