How sage-erp-x3/typescript works
TypeScript is a compiler and application-development toolchain. A typical command-line path starts with a developer invoking tsc, parses options and source, builds a program, checks types, transforms and emits JavaScript and declarations. Its other major product branch is the editor language service exposed through tsserver, alongside project/watch and typings support. The graph follows documented or indexed module relationships; some internal stage-to-stage calls and external host details are not shown in the excerpts, so those links are omitted rather than inferred.
Main entry points: program.ts Program Builder · tsc.ts tsc CLI · editorServices.ts Project Services · services.ts Language Service
Components 22
Compiler
- tsc CLI
src/tsc/tsc.ts - Options Parser
src/compiler/commandLineParser.ts - Source Parser
src/compiler/parser.ts - Binder
src/compiler/binder.ts - Type Checker
src/compiler/checker.ts - Program Builder
src/compiler/program.ts - Transformers
src/compiler/transformer.ts - JavaScript Emitter
src/compiler/emitter.ts - Build Mode
src/compiler/tsbuild.ts - Watch Mode
src/compiler/watch.ts
Editor Services
- Language Service
src/services/services.ts - Code Classifier
src/services/classifier.ts - Code Fixes
src/services/codeFixProvider.ts
Language Server
- tsserver Entry
src/tsserver/server.ts - Protocol Session
src/server/session.ts - Project Services
src/server/editorServices.ts - Server Protocol
src/server/protocol.ts
Project Support
- JS Typings
src/jsTyping/jsTyping.ts - Typings Installer
src/typingsInstaller/nodeTypingsInstaller.ts - Standard Libraries
src/lib
Other components
- Developer
- Host Filesystem
Connections 21
- Developer → tsc CLI: invokes
README.md - tsc CLI → Options Parser: parses options
- Options Parser → Program Builder: configures build
- Program Builder → Source Parser: parses sources
- Program Builder → Binder: binds symbols
- Program Builder → Type Checker: checks types
- Program Builder → Transformers: transforms sources
- Program Builder → JavaScript Emitter: emits outputs
- tsc CLI → Build Mode: supports builds
- tsc CLI → Watch Mode: supports watch
- Developer → tsserver Entry: uses editor
- tsserver Entry → Protocol Session: starts session
src/tsserver/server.ts - Protocol Session → Server Protocol: handles messages
src/server/session.ts - Protocol Session → Project Services: dispatches requests
- Project Services → Language Service: provides language features
- Language Service → Code Classifier: creates classifier
src/services/services.ts - Language Service → Code Fixes: offers fixes
- Project Services → Host Filesystem: reads config
src/server/editorServices.ts - Project Services → JS Typings: uses typing support
- JS Typings → Typings Installer: requests typings
- Program Builder → Standard Libraries: includes libraries