@omnia/fx
Version:
Provide Omnia Fx typings and tooling for clientside Omnia development.
35 lines (34 loc) • 1.18 kB
TypeScript
/**
* Number and Boolean props are treated as strings
* We should convert it so props will behave as intended
* Conversion can be overwritted by prop validation (https://vuejs.org/v2/guide/components-props.html#Prop-Validation)
* @param value
* @param overrideType
* @returns {*}
*/
export declare function convertAttributeValue(value: any, overrideType: any): any;
/**
* Extract props from component definition, no matter if it's array or object
* @param componentDefinition
* @param Vue
*/
export declare function getProps(componentDefinition?: any): {
camelCase: any[];
hyphenate: any[];
types: {};
};
/**
* If we get DOM node of element we could use it like this:
* document.querySelector('widget-vue1').prop1 <-- get prop
* document.querySelector('widget-vue1').prop1 = 'new Value' <-- set prop
* @param element
* @param props
*/
export declare function reactiveProps(element: any, props: any): void;
/**
* In root Vue instance we should initialize props as 'propsData'.
* @param instanceOptions
* @param componentDefinition
* @param props
*/
export declare function getPropsData(element: any, componentDefinition: any, props: any): any;