MCPcopy
hub / github.com/BuilderIO/mitosis / componentToAngular

Function componentToAngular

packages/core/src/generators/angular/component.ts:7–27  ·  view source on GitHub ↗
(userOptions = {})

Source from the content-addressed store, hash-verified

5import { TranspilerGenerator } from '@/types/transpiler';
6
7export 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};

Callers 4

builder.test.tsFile · 0.90
generateCodeFunction · 0.85
getOutputGeneratorFunction · 0.85

Calls 3

initializeOptionsFunction · 0.90

Tested by

no test coverage detected