UNPKG

@builder.io/mitosis

Version:

Write components once, run everywhere. Compiles to Vue, React, Solid, and Liquid. Import code from Figma and Builder.io

34 lines (33 loc) 1.82 kB
import { AngularBlockOptions, ToAngularOptions } from '../../../generators/angular/types'; import { type MitosisComponent } from '../../../types/mitosis-component'; import { MitosisNode } from '../../../types/mitosis-node'; export declare const HELPER_FUNCTIONS: (isTs?: boolean) => { [key: string]: string; }; export declare const getAppropriateTemplateFunctionKeys: (code: string) => string[]; export declare const getDefaultProps: ({ defaultProps }: MitosisComponent) => string; /** * if any state "property" is trying to access state.* or props.* * then we need to move them to onInit where they can be accessed * @param json The MitosisComponent. */ export declare const transformState: (json: MitosisComponent) => void; /** * Checks if the first child has a "key" attribute - used for "For" elements * @param node The node which should be "For" */ export declare const hasFirstChildKeyAttribute: (node: MitosisNode) => boolean; export declare const preprocessCssAsJson: (json: MitosisComponent) => void; export declare const generateNgModule: (content: string, name: string, componentsUsed: string[], component: MitosisComponent, bootstrapMapper: Function | null | undefined) => string; export declare const traverseToGetAllDynamicComponents: (json: MitosisComponent, options: ToAngularOptions, blockOptions: AngularBlockOptions) => { components: Set<string>; dynamicTemplate: string; }; export declare const getTemplateFormat: (template: string) => string; export declare const traverseAndCheckIfInnerHTMLIsUsed: (json: MitosisComponent) => boolean; export declare const processAngularCode: ({ contextVars, outputVars, domRefs, replaceWith, }: { contextVars: string[]; outputVars: string[]; domRefs: string[]; replaceWith?: string | undefined; }) => (code: string) => string;