({
code,
plugins,
options,
json,
}: {
json: MitosisComponent;
code: string;
plugins: MitosisPlugin[];
options?: any;
})
| 42 | }; |
| 43 | |
| 44 | export const runPreCodePlugins = ({ |
| 45 | code, |
| 46 | plugins, |
| 47 | options, |
| 48 | json, |
| 49 | }: { |
| 50 | json: MitosisComponent; |
| 51 | code: string; |
| 52 | plugins: MitosisPlugin[]; |
| 53 | options?: any; |
| 54 | }) => { |
| 55 | let string = code; |
| 56 | for (const plugin of plugins) { |
| 57 | const preFunction = plugin(options).code?.pre; |
| 58 | if (preFunction) { |
| 59 | string = preFunction(string, json); |
| 60 | } |
| 61 | } |
| 62 | return string; |
| 63 | }; |
| 64 | |
| 65 | export const runPostCodePlugins = ({ |
| 66 | code, |
no outgoing calls
no test coverage detected