import type { IFieldBase } from './field.types'; import { FieldBase, FormModel } from './field.types'; export interface IArray extends IFieldBase { classExample: () => any; addText?: string; value: any[]; wrangleResult: Function; } export class ArrayModel extends FieldBase implements IArray { type = 'array'; classExample = () => {}; addText = 'Add'; wrangleResult = null; constructor(list: Partial) { super(list); this.classExample = list.classExample ?? this.classExample; this.addText = list.addText ?? this.addText; this.wrangleResult = list.wrangleResult ?? (d => d); } }