UNPKG

@builder.io/mitosis

Version:

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

26 lines (25 loc) 1.27 kB
import type { MitosisComponent } from '../../../types/mitosis-component'; export declare const addCodeNgAfterViewInit: (json: MitosisComponent, code: string) => void; /** * Adds code to the `onUpdate` hook of a MitosisComponent. * * @param {MitosisComponent} root - The root MitosisComponent. * @param {string} code - The code to be added to the `onUpdate` hook. */ export declare const addCodeToOnUpdate: (root: MitosisComponent, code: string) => void; /** * Adds code to the `onInit` hook of a MitosisComponent. * * @param {MitosisComponent} root - The root MitosisComponent. * @param {string} code - The code to be added to the `onInit` hook. */ export declare const addCodeToOnInit: (root: MitosisComponent, code: string) => void; /** * Creates a reactive state in Angular. * Initializes the state with `null` because we cannot access `state.` or `props.` properties before the component is initialized. * Adds the code (init/re-init code) to the `onInit` and `onUpdate` hooks. * @param root The root MitosisComponent. * @param stateName The name of the reactive state. * @param code The code to be added to the onInit and onUpdate hooks. */ export declare const makeReactiveState: (root: MitosisComponent, stateName: string, code: string) => void;