( choice: unknown, options?: UserScriptSecretSanitizerOptions, )
| 932 | } |
| 933 | |
| 934 | export function stripUserScriptSecretRefsFromChoice( |
| 935 | choice: unknown, |
| 936 | options?: UserScriptSecretSanitizerOptions, |
| 937 | ): void { |
| 938 | if (!isRecord(choice)) return; |
| 939 | |
| 940 | if (choice.type === "Macro" && isRecord(choice.macro)) { |
| 941 | stripUserScriptSecretRefsFromCommands(choice.macro.commands, options); |
| 942 | } |
| 943 | |
| 944 | if (choice.type === "Multi" && Array.isArray(choice.choices)) { |
| 945 | for (const child of choice.choices) { |
| 946 | stripUserScriptSecretRefsFromChoice(child, options); |
| 947 | } |
| 948 | } |
| 949 | } |
no test coverage detected