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

Function printAllHelp

internal/execute/tsc/help.go:110–133  ·  view source on GitHub ↗
(sys System, locale locale.Locale, options []*tsoptions.CommandLineOption)

Source from the content-addressed store, hash-verified

108}
109
110func printAllHelp(sys System, locale locale.Locale, options []*tsoptions.CommandLineOption) {
111 var output []string
112 msg := diagnostics.X_tsc_Colon_The_TypeScript_Compiler.Localize(locale) + " - " + diagnostics.Version_0.Localize(locale, core.Version())
113 output = append(output, getHeader(sys, msg)...)
114
115 // ALL COMPILER OPTIONS section
116 afterCompilerOptions := diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0.Localize(locale, "https://aka.ms/tsc")
117 output = append(output, generateSectionOptionsOutput(sys, locale, diagnostics.ALL_COMPILER_OPTIONS.Localize(locale), options, true, nil, &afterCompilerOptions)...)
118
119 // WATCH OPTIONS section
120 beforeWatchOptions := diagnostics.Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon.Localize(locale)
121 output = append(output, generateSectionOptionsOutput(sys, locale, diagnostics.WATCH_OPTIONS.Localize(locale), tsoptions.OptionsForWatch, false, &beforeWatchOptions, nil)...)
122
123 // BUILD OPTIONS section
124 beforeBuildOptions := diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0.Localize(locale, "https://aka.ms/tsc-composite-builds")
125 buildOptions := core.Filter(tsoptions.OptionsForBuild, func(option *tsoptions.CommandLineOption) bool {
126 return option != &tsoptions.TscBuildOption
127 })
128 output = append(output, generateSectionOptionsOutput(sys, locale, diagnostics.BUILD_OPTIONS.Localize(locale), buildOptions, false, &beforeBuildOptions, nil)...)
129
130 for _, chunk := range output {
131 fmt.Fprint(sys.Writer(), chunk)
132 }
133}
134
135func PrintBuildHelp(sys System, locale locale.Locale, buildOptions []*tsoptions.CommandLineOption) {
136 var output []string

Callers 1

PrintHelpFunction · 0.85

Calls 7

VersionFunction · 0.92
FilterFunction · 0.92
getHeaderFunction · 0.85
LocalizeMethod · 0.65
WriterMethod · 0.65
appendFunction · 0.50

Tested by

no test coverage detected