(userOptions = {})
| 5 | import { TranspilerGenerator } from '@/types/transpiler'; |
| 6 | |
| 7 | export const componentToAngular: TranspilerGenerator<ToAngularOptions> = (userOptions = {}) => { |
| 8 | return (args) => { |
| 9 | const options = initializeOptions({ |
| 10 | target: 'angular', |
| 11 | component: args.component, |
| 12 | defaults: DEFAULT_ANGULAR_OPTIONS, |
| 13 | userOptions, |
| 14 | }); |
| 15 | |
| 16 | if (options.api === 'signals') { |
| 17 | /* |
| 18 | * Some features aren't available to reduce complexity for now: |
| 19 | * - Spread props |
| 20 | * - Dynamic components |
| 21 | */ |
| 22 | return componentToAngularSignals(userOptions)(args); |
| 23 | } |
| 24 | |
| 25 | return componentToAngularClassic(userOptions)(args); |
| 26 | }; |
| 27 | }; |
no test coverage detected