@builder.io/mitosis
Version:
Write components once, run everywhere. Compiles to Vue, React, Solid, and Liquid. Import code from Figma and Builder.io
21 lines (20 loc) • 1.01 kB
TypeScript
import { MitosisComponent } from '../types/mitosis-component';
import { MitosisContext } from '../types/mitosis-context';
type ValueMapper = (code: string, type: 'data' | 'function' | 'getter', typeParameter: string | undefined, key: string | undefined) => string;
interface GetStateObjectStringOptions {
data?: boolean;
functions?: boolean;
getters?: boolean;
valueMapper?: ValueMapper;
/**
* If you want the plain value mapper as output
*/
onlyValueMapper?: boolean;
format?: 'object' | 'class' | 'variables';
keyPrefix?: string;
withType?: boolean;
}
export declare const getMemberObjectString: (object: MitosisComponent['state'], userOptions?: GetStateObjectStringOptions) => string;
export declare const stringifyContextValue: (object: MitosisContext['value'], userOptions?: GetStateObjectStringOptions) => string;
export declare const getStateObjectStringFromComponent: (component: MitosisComponent, options?: GetStateObjectStringOptions) => string;
export {};