(self: Instruction, description: string)
| 862 | } |
| 863 | |
| 864 | const withDescriptionInternal = (self: Instruction, description: string): Args.Args<any> => { |
| 865 | switch (self._tag) { |
| 866 | case "Empty": { |
| 867 | return none |
| 868 | } |
| 869 | case "Single": { |
| 870 | const desc = InternalHelpDoc.sequence(self.description, InternalHelpDoc.p(description)) |
| 871 | return makeSingle(self.pseudoName, self.primitiveType, desc) |
| 872 | } |
| 873 | case "Map": { |
| 874 | return makeMap(withDescriptionInternal(self.args as Instruction, description), self.f) |
| 875 | } |
| 876 | case "Both": { |
| 877 | return makeBoth( |
| 878 | withDescriptionInternal(self.left as Instruction, description), |
| 879 | withDescriptionInternal(self.right as Instruction, description) |
| 880 | ) |
| 881 | } |
| 882 | case "Variadic": { |
| 883 | return makeVariadic( |
| 884 | withDescriptionInternal(self.args as Instruction, description), |
| 885 | self.min, |
| 886 | self.max |
| 887 | ) |
| 888 | } |
| 889 | case "WithDefault": { |
| 890 | return makeWithDefault( |
| 891 | withDescriptionInternal(self.args as Instruction, description), |
| 892 | self.fallback |
| 893 | ) |
| 894 | } |
| 895 | case "WithFallbackConfig": { |
| 896 | return makeWithFallbackConfig( |
| 897 | withDescriptionInternal(self.args as Instruction, description), |
| 898 | self.config |
| 899 | ) |
| 900 | } |
| 901 | } |
| 902 | } |
| 903 | |
| 904 | const wizardInternal = (self: Instruction, config: CliConfig.CliConfig): Effect.Effect< |
| 905 | Array<string>, |
no test coverage detected