UNPKG

datainout

Version:

Import and reports data

25 lines (22 loc) 722 B
import { AttributeType, BaseAttribute, SheetExcelOption } from './common-type.js'; type BaseAttributeImporter = { type: AttributeType; required?: boolean; setValue?: (attributeValue?: any, row?: Record<string, any>) => any; validate?: (val: any) => { isValid: boolean; message?: string; } | Error; } & BaseAttribute; /** Excel import template */ type CellImportOptions = { address?: string; fullAddress?: { sheetName: string; address: string; row: number; col: number; }; } & BaseAttributeImporter; type SheetImportOptions = SheetExcelOption<CellImportOptions>; export type { BaseAttributeImporter, CellImportOptions, SheetImportOptions };