intermediate
tsconfig и project references
Strictness, module resolution, path aliases, incremental builds и границы monorepo.
`tsconfig` определяет compiler contract: strictness, `module`/`moduleResolution`, JSX mode, `lib`, path aliases, emit behavior и incremental options. Project references делят large workspaces на buildable units с explicit dependency order и faster incremental builds.
Path aliases требуют matching runtime или bundler config. `skipLibCheck` может скрыть declaration conflicts. Разные tsconfig files создают inconsistent strictness между apps и tests.
На интервью: объясняйте на конкретном примере и называйте, что проверяют в production code.
Типовые ошибки: путать похожие API и забывать edge cases в live coding.
Компромисс часто между ясностью и безопасностью или expressiveness и maintainability. Чеклист:
- Core strict settings.
- Module resolution aligned.
- References для large workspaces.