| 25 | } |
| 26 | |
| 27 | func getOptionsForHelp(commandLine *tsoptions.ParsedCommandLine) []*tsoptions.CommandLineOption { |
| 28 | // Sort our options by their names, (e.g. "--noImplicitAny" comes before "--watch") |
| 29 | opts := slices.Clone(tsoptions.OptionsDeclarations) |
| 30 | opts = append(opts, &tsoptions.TscBuildOption) |
| 31 | |
| 32 | if commandLine.CompilerOptions().All.IsTrue() { |
| 33 | slices.SortFunc(opts, func(a, b *tsoptions.CommandLineOption) int { |
| 34 | return strings.Compare(strings.ToLower(a.Name), strings.ToLower(b.Name)) |
| 35 | }) |
| 36 | return opts |
| 37 | } else { |
| 38 | return core.Filter(opts, func(opt *tsoptions.CommandLineOption) bool { |
| 39 | return opt.ShowInSimplifiedHelpView |
| 40 | }) |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | func getHeader(sys System, message string) []string { |
| 45 | colors := createColors(sys) |