import { PropertyObjectState } from "./types"; /** * Make string, array to PropertyObject for the dot product */ declare class PropertyObject implements PropertyObjectState { value: any[]; prefix: string; suffix: string; model: string; type: string; separator: string; /** * @param - This value is in the array format. * @param - options * @example var obj = new PropertyObject([100,100,100,0.5], { "separator" : ",", "prefix" : "rgba(", "suffix" : ")" }); */ constructor(value: string | any[], options?: Partial); setOptions(newOptions: Partial): this; /** * the number of values. * @example const obj1 = new PropertyObject("1,2,3", ","); console.log(obj1.length); // 3 */ size(): number; /** * retrieve one of values at the index * @param {Number} index - index * @return {Object} one of values at the index * @example const obj1 = new PropertyObject("1,2,3", ","); console.log(obj1.get(0)); // 1 */ get(index: number): any; /** * Set the value at that index * @param {Number} index - index * @param {Object} value - text, a number, object to set * @return {PropertyObject} An instance itself * @example const obj1 = new PropertyObject("1,2,3", ","); obj1.set(0, 2); console.log(obj1.toValue()); // 2,2,3 */ set(index: number, value: any): this; /** * create a copy of an instance itself. * @return {PropertyObject} clone * @example const obj1 = new PropertyObject("1,2,3", ","); const obj2 = obj1.clone(); */ clone(): PropertyObject; /** * Make Property Object to String * @return {String} Make Property Object to String * @example //rgba(100, 100, 100, 0.5) const obj4 = new PropertyObject([100,100,100,0.5], { "separator" : ",", "prefix" : "rgba(", "suffix" : ")", }); console.log(obj4.toValue()); // "rgba(100,100,100,0.5)" */ toValue(): string; /** * Make Property Object's array to String * @return {String} Join the elements of an array into a string * @example //rgba(100, 100, 100, 0.5) var obj4 = new PropertyObject([100,100,100,0.5], { "separator" : ",", "prefix" : "rgba(", "suffix" : ")" }); obj4.join(); // => "100,100,100,0.5" */ join(): string; /** * executes a provided function once per array element. * @param {Function} callback - Function to execute for each element, taking three arguments * @param {All} [callback.currentValue] The current element being processed in the array. * @param {Number} [callback.index] The index of the current element being processed in the array. * @param {Array} [callback.array] the array. * @return {PropertyObject} An instance itself * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach|MDN Array.forEach()} reference to MDN document. * @example //rgba(100, 100, 100, 0.5) var obj4 = new PropertyObject([100,100,100,0.5], { "separator" : ",", "prefix" : "rgba(", "suffix" : ")" }); obj4.forEach(t => { console.log(t); }); // => "100,100,100,0.5" */ forEach(func: (value?: any, index?: number, array?: any[]) => void): this; } export default PropertyObject;