Code
How microsoft/typescript is laid out, and where to start for common changes.
There is no import map for this report yet.
Where to start reading
- Repository root
- Repository root
- Likely public API
- Likely start-up file
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
Find files for a task
AIAdd a new compiler diagnostic rule
- Define the diagnostic category and message ID in packages/typescript/src/enums/diagnosticCategory.ts
- Add diagnostic check logic in the type checker that creates diagnostic messages with the new category
- Format and surface the diagnostic through the language service API
Add a new syntax construct or keyword
- Add the new syntax kind to the SyntaxKind enumeration
- Update scanner to recognize and tokenize the new keyword
- Add parser rules and AST node type to handle the new syntax
Add a new compiler option
- Define the option schema and parsing logic in options configuration
- Pass the option through the compilation pipeline via compiler options object
- Implement behavior controlled by the new option in the appropriate analysis or emit phase
Add protocol support for a new language service request
- Define message types in the protocol specification
- Add message encoding and decoding support
- Implement the request handler in the synchronous API
- Wire the protocol message to the API handler in the node server infrastructure
Change the public API
Trace runtime behavior
Add or update tests
Change build or automation
RepoPilot lists up to 500 files, so a file missing here may still exist.
- Files marked “likely” are guessed from their names.
- The file list is newer than the written guide, so descriptions and suggested changes may describe older code.