Documentation
¶
Index ¶
- func EmitAndReportStatistics(input EmitInput) (CompileAndEmitResult, *Statistics)
- func GetTraceWithWriterFromSys(w io.Writer, testing CommandLineTesting) func(msg string)
- func PrintBuildHelp(sys System, buildOptions []*tsoptions.CommandLineOption)
- func PrintHelp(sys System, commandLine *tsoptions.ParsedCommandLine)
- func PrintVersion(sys System)
- func QuietDiagnosticReporter(diagnostic *ast.Diagnostic)
- func QuietDiagnosticsReporter(diagnostics []*ast.Diagnostic)
- type CommandLineResult
- type CommandLineTesting
- type CompileAndEmitResult
- type CompileTimes
- type DiagnosticReporter
- func CreateBuilderStatusReporter(sys System, w io.Writer, options *core.CompilerOptions, ...) DiagnosticReporter
- func CreateDiagnosticReporter(sys System, w io.Writer, options *core.CompilerOptions) DiagnosticReporter
- func CreateWatchStatusReporter(sys System, options *core.CompilerOptions, testing CommandLineTesting) DiagnosticReporter
- type DiagnosticsReporter
- type EmitInput
- type ExitStatus
- type ExtendedConfigCache
- type Statistics
- type System
- type Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EmitAndReportStatistics ¶
func EmitAndReportStatistics(input EmitInput) (CompileAndEmitResult, *Statistics)
func GetTraceWithWriterFromSys ¶
func GetTraceWithWriterFromSys(w io.Writer, testing CommandLineTesting) func(msg string)
func PrintBuildHelp ¶
func PrintBuildHelp(sys System, buildOptions []*tsoptions.CommandLineOption)
func PrintHelp ¶
func PrintHelp(sys System, commandLine *tsoptions.ParsedCommandLine)
func PrintVersion ¶
func PrintVersion(sys System)
func QuietDiagnosticReporter ¶
func QuietDiagnosticReporter(diagnostic *ast.Diagnostic)
func QuietDiagnosticsReporter ¶
func QuietDiagnosticsReporter(diagnostics []*ast.Diagnostic)
Types ¶
type CommandLineResult ¶
type CommandLineResult struct { Status ExitStatus Watcher Watcher }
type CommandLineTesting ¶
type CommandLineTesting interface { // Ensure that all emitted files are timestamped in order to ensure they are deterministic for test baseline OnEmittedFiles(result *compiler.EmitResult, mTimesCache *collections.SyncMap[tspath.Path, time.Time]) OnListFilesStart(w io.Writer) OnListFilesEnd(w io.Writer) OnStatisticsStart(w io.Writer) OnStatisticsEnd(w io.Writer) OnBuildStatusReportStart(w io.Writer) OnBuildStatusReportEnd(w io.Writer) OnWatchStatusReportStart() OnWatchStatusReportEnd() GetTrace(w io.Writer) func(msg string) OnProgram(program *incremental.Program) }
type CompileAndEmitResult ¶
type CompileAndEmitResult struct { Diagnostics []*ast.Diagnostic EmitResult *compiler.EmitResult Status ExitStatus // contains filtered or unexported fields }
func EmitFilesAndReportErrors ¶
func EmitFilesAndReportErrors(input EmitInput) (result CompileAndEmitResult)
type CompileTimes ¶
type DiagnosticReporter ¶
type DiagnosticReporter = func(*ast.Diagnostic)
func CreateBuilderStatusReporter ¶
func CreateBuilderStatusReporter(sys System, w io.Writer, options *core.CompilerOptions, testing CommandLineTesting) DiagnosticReporter
func CreateDiagnosticReporter ¶
func CreateDiagnosticReporter(sys System, w io.Writer, options *core.CompilerOptions) DiagnosticReporter
func CreateWatchStatusReporter ¶
func CreateWatchStatusReporter(sys System, options *core.CompilerOptions, testing CommandLineTesting) DiagnosticReporter
type DiagnosticsReporter ¶
type DiagnosticsReporter = func(diagnostics []*ast.Diagnostic)
func CreateReportErrorSummary ¶
func CreateReportErrorSummary(sys System, options *core.CompilerOptions) DiagnosticsReporter
type EmitInput ¶
type EmitInput struct { Sys System ProgramLike compiler.ProgramLike Program *compiler.Program Config *tsoptions.ParsedCommandLine ReportDiagnostic DiagnosticReporter ReportErrorSummary DiagnosticsReporter Writer io.Writer WriteFile compiler.WriteFile CompileTimes *CompileTimes Testing CommandLineTesting TestingMTimesCache *collections.SyncMap[tspath.Path, time.Time] }
type ExitStatus ¶
type ExitStatus int
const ( ExitStatusSuccess ExitStatus = 0 ExitStatusDiagnosticsPresent_OutputsGenerated ExitStatus = 1 ExitStatusDiagnosticsPresent_OutputsSkipped ExitStatus = 2 ExitStatusInvalidProject_OutputsSkipped ExitStatus = 3 ExitStatusProjectReferenceCycle_OutputsSkipped ExitStatus = 4 ExitStatusNotImplemented ExitStatus = 5 )
type ExtendedConfigCache ¶
type ExtendedConfigCache struct {
// contains filtered or unexported fields
}
extendedConfigCache is a minimal implementation of tsoptions.ExtendedConfigCache. It is concurrency-safe, but stores cached entries permanently. This implementation should not be used for long-running processes where configuration changes over the course of multiple compilations.
func (*ExtendedConfigCache) GetExtendedConfig ¶
func (e *ExtendedConfigCache) GetExtendedConfig(fileName string, path tspath.Path, parse func() *tsoptions.ExtendedConfigCacheEntry) *tsoptions.ExtendedConfigCacheEntry
GetExtendedConfig implements tsoptions.ExtendedConfigCache.
type Statistics ¶
type Statistics struct { Projects int ProjectsBuilt int TimestampUpdates int // contains filtered or unexported fields }
func (*Statistics) Aggregate ¶
func (s *Statistics) Aggregate(stats []*Statistics, totalTime time.Duration)
func (*Statistics) Report ¶
func (s *Statistics) Report(w io.Writer, testing CommandLineTesting)
Click to show internal directories.
Click to hide internal directories.