@@ -14,9 +14,9 @@ import (
1414
1515 "github.com/microsoft/typescript-go/internal/ast"
1616 "github.com/microsoft/typescript-go/internal/bundled"
17- ts "github.com/microsoft/typescript-go/internal/compiler"
18- "github.com/microsoft/typescript-go/internal/compiler/diagnostics"
17+ "github.com/microsoft/typescript-go/internal/compiler"
1918 "github.com/microsoft/typescript-go/internal/core"
19+ "github.com/microsoft/typescript-go/internal/diagnostics"
2020 "github.com/microsoft/typescript-go/internal/diagnosticwriter"
2121 "github.com/microsoft/typescript-go/internal/execute"
2222 "github.com/microsoft/typescript-go/internal/pprof"
@@ -169,10 +169,10 @@ func runMain() int {
169169
170170 currentDirectory = tspath .GetDirectoryPath (configFileName )
171171 // !!! is the working directory actually the config path?
172- host := ts .NewCachedFSCompilerHost (compilerOptions , currentDirectory , fs , defaultLibraryPath )
172+ host := compiler .NewCachedFSCompilerHost (compilerOptions , currentDirectory , fs , defaultLibraryPath )
173173
174174 parseStart := time .Now ()
175- program := ts .NewProgram (ts .ProgramOptions {
175+ program := compiler .NewProgram (compiler .ProgramOptions {
176176 ConfigFileName : configFileName ,
177177 Options : compilerOptions ,
178178 SingleThreaded : opts .devel .singleThreaded ,
@@ -226,7 +226,7 @@ func runMain() int {
226226 var emitTime time.Duration
227227 if compilerOptions .NoEmit .IsFalseOrUnknown () {
228228 emitStart := time .Now ()
229- result := program .Emit (ts .EmitOptions {})
229+ result := program .Emit (compiler .EmitOptions {})
230230 diagnostics = append (diagnostics , result .Diagnostics ... )
231231 emitTime = time .Since (emitStart )
232232 }
@@ -242,7 +242,7 @@ func runMain() int {
242242 exitCode := 0
243243 if len (diagnostics ) != 0 {
244244 if ! opts .devel .quiet {
245- printDiagnostics (ts .SortAndDeduplicateDiagnostics (diagnostics ), host , compilerOptions )
245+ printDiagnostics (compiler .SortAndDeduplicateDiagnostics (diagnostics ), host , compilerOptions )
246246 }
247247 exitCode = 1
248248 }
@@ -315,21 +315,21 @@ func formatDuration(d time.Duration) string {
315315 return fmt .Sprintf ("%.3fs" , d .Seconds ())
316316}
317317
318- func identifierCount (p * ts .Program ) int {
318+ func identifierCount (p * compiler .Program ) int {
319319 count := 0
320320 for _ , file := range p .SourceFiles () {
321321 count += file .IdentifierCount
322322 }
323323 return count
324324}
325325
326- func listFiles (p * ts .Program ) {
326+ func listFiles (p * compiler .Program ) {
327327 for _ , file := range p .SourceFiles () {
328328 fmt .Println (file .FileName ())
329329 }
330330}
331331
332- func getFormatOpts (host ts .CompilerHost ) * diagnosticwriter.FormattingOptions {
332+ func getFormatOpts (host compiler .CompilerHost ) * diagnosticwriter.FormattingOptions {
333333 return & diagnosticwriter.FormattingOptions {
334334 NewLine : host .NewLine (),
335335 ComparePathsOptions : tspath.ComparePathsOptions {
@@ -339,7 +339,7 @@ func getFormatOpts(host ts.CompilerHost) *diagnosticwriter.FormattingOptions {
339339 }
340340}
341341
342- func printDiagnostics (diagnostics []* ast.Diagnostic , host ts .CompilerHost , compilerOptions * core.CompilerOptions ) {
342+ func printDiagnostics (diagnostics []* ast.Diagnostic , host compiler .CompilerHost , compilerOptions * core.CompilerOptions ) {
343343 formatOpts := getFormatOpts (host )
344344 if compilerOptions .Pretty .IsTrueOrUnknown () {
345345 diagnosticwriter .FormatDiagnosticsWithColorAndContext (os .Stdout , diagnostics , formatOpts )
0 commit comments