miscUtil.d.ts 948 B

1234567891011121314
  1. import type { InternalMode, Locale, SharedPickerProps } from '../interface';
  2. export declare function leftPad(str: string | number, length: number, fill?: string): string;
  3. /**
  4. * Convert `value` to array. Will provide `[]` if is null or undefined.
  5. */
  6. export declare function toArray<T>(val: T | T[]): T[];
  7. export declare function fillIndex<T extends any[]>(ori: T, index: number, value: T[number]): T;
  8. /** Pick props from the key list. Will filter empty value */
  9. export declare function pickProps<T extends object>(props: T, keys?: (keyof T)[] | readonly (keyof T)[]): T;
  10. export declare function getRowFormat(picker: InternalMode, locale: Locale, format?: SharedPickerProps['format']): {
  11. format: string;
  12. type?: "mask";
  13. } | import("../interface").FormatType<any> | import("../interface").FormatType<any>[];
  14. export declare function getFromDate<DateType>(calendarValues: DateType[], activeIndexList: number[], activeIndex?: number): DateType;