@builder.io/mitosis
Version:
Write components once, run everywhere. Compiles to Vue, React, Solid, and Liquid. Import code from Figma and Builder.io
17 lines (16 loc) • 834 B
TypeScript
import { MitosisComponent } from '../../../types/mitosis-component';
import * as babel from '@babel/core';
import { NodePath } from '@babel/core';
import { Context, ParseMitosisOptions } from '../types';
declare const types: typeof babel.types;
export declare function parseDefaultPropsHook(component: MitosisComponent, expression: babel.types.CallExpression): void;
export declare function generateUseStyleCode(expression: babel.types.CallExpression): string;
/**
* Transform useMetadata({...}) onto the component JSON as
* meta: { metadataHook: { ... }}
*
* This function collects metadata and removes the statement from
* the returned nodes array
*/
export declare const collectModuleScopeHooks: (context: Context, options: ParseMitosisOptions) => (path: NodePath<babel.types.Program>) => babel.types.Statement[];
export {};