MCPcopy Create free account
hub / github.com/microsoft/typescript-go / CommandLine

Function CommandLine

internal/execute/tsc.go:52–63  ·  view source on GitHub ↗
(ctx context.Context, sys tsc.System, commandLineArgs []string, testing tsc.CommandLineTesting)

Source from the content-addressed store, hash-verified

50}
51
52func CommandLine(ctx context.Context, sys tsc.System, commandLineArgs []string, testing tsc.CommandLineTesting) tsc.CommandLineResult {
53 if len(commandLineArgs) > 0 {
54 switch strings.ToLower(commandLineArgs[0]) {
55 case "-b", "--b", "-build", "--build":
56 return tscBuildCompilation(ctx, sys, tsoptions.ParseBuildCommandLine(commandLineArgs, sys), testing)
57 // case "-f":
58 // return fmtMain(sys, commandLineArgs[1], commandLineArgs[1])
59 }
60 }
61
62 return tscCompilation(ctx, sys, tsoptions.ParseCommandLine(commandLineArgs, sys), testing)
63}
64
65func fmtMain(sys tsc.System, input, output string) tsc.ExitStatus {
66 ctx := format.WithFormatCodeSettings(context.Background(), lsutil.GetDefaultFormatCodeSettings(), "\n")

Callers 6

GetFileMapWithBuildFunction · 0.92
createTestWatcherFunction · 0.92
executeCommandMethod · 0.92
runMethod · 0.92
runMainFunction · 0.92

Calls 5

ParseBuildCommandLineFunction · 0.92
ParseCommandLineFunction · 0.92
lenFunction · 0.85
tscBuildCompilationFunction · 0.85
tscCompilationFunction · 0.85

Tested by 2

createTestWatcherFunction · 0.74