lib.d.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import { FunctionRegiste, LibParamType } from "../types";
  2. import { Scope } from "../Scope";
  3. export declare function toString(value: any): string;
  4. export declare function isEmpty(value: any): boolean;
  5. export declare function getRegList(): FunctionRegiste[];
  6. export declare function getRegParamList(methodName: string): any;
  7. /**
  8. * 模拟点击按钮
  9. */
  10. export declare function raiseClick(buttonHandle: any): boolean;
  11. /**
  12. * 标注系统全局函数的参数
  13. * @param title 函数名称
  14. * @param type 函数类型
  15. * @param allowEmpty 可否为空
  16. */
  17. export declare function LibParam(title: string, type: LibParamType, allowEmpty?: boolean): (target: any, methodName: any, paramsIndex: any) => void;
  18. /**
  19. * 标注函数变成"系统全局函数"
  20. */
  21. export declare function Lib(registe: FunctionRegiste): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => any;
  22. /**
  23. * 解析事件
  24. * 'scope.私有方法名'
  25. * 'system.系统函数名'
  26. * 'format.格式化名'
  27. */
  28. export declare function lookupFn(scope: Scope, event: string): Function;
  29. /**
  30. * 从 ext.element 获取 scope 对象
  31. */
  32. export declare function lookupScope(extHandle: any): Scope;
  33. /**
  34. * 转换内联结构的行,到平面结构
  35. * company: { name:'公司1', id:'编号1' } => { company_id:'编号1', company_name:'公司1' }
  36. *
  37. * @param array
  38. * @param flatOption
  39. * @return {[]}
  40. */
  41. export declare function flatRow(array: any): any[];