(...mutations: CodeMutation[])
| 180 | } |
| 181 | |
| 182 | export function composeMutations(...mutations: CodeMutation[]) { |
| 183 | return (input: CompilerPayload) => { |
| 184 | let result = input; |
| 185 | for (const mutate of mutations) { |
| 186 | const intermediateResult = mutate(result); |
| 187 | if (!intermediateResult) { |
| 188 | break; |
| 189 | } else { |
| 190 | result = intermediateResult; |
| 191 | } |
| 192 | } |
| 193 | return result; |
| 194 | }; |
| 195 | } |
| 196 | |
| 197 | export const defaultParams: CompilerParams = { |
| 198 | sourceRoot: "src", |
no outgoing calls
no test coverage detected