import { PipeTransform } from '@angular/core'; import { SelectItem } from './select-item.model'; /** * 将枚举转换为 SelectItem */ export declare function transformToSelectItem(value: any, optionalItem?: boolean | string): SelectItem[]; /** * Keyvalue select dropdown, use with enum, or object * @example * * * * public myDirection = NumberDirection; // type of enum * public myDirectionValue = NumberDirection.Down; // enum value * * * export enum NumberDirection { * Up = 1, * Down = 2, * Left = 4, * Right = 'abc'.length * } * * export enum StringDirection { * Up = 'aUp', * Down = 'aDown', * Left = 'aLeft', * Right = 'aRight' * } */ export declare class SelectItemPipe implements PipeTransform { /** * transform * * @param value type of enum * @param optionalItem 添加默认的空项 */ transform(value: any, optionalItem?: boolean | string): SelectItem[]; } export declare class SelectItemPipeModule { }