get.d.ts 613 B

1234567891011121314151617181920212223
  1. import { XEUtilsMethods } from '../xe-utils'
  2. /**
  3. * 获取对象的属性的值,如果值为 undefined,则返回默认值
  4. * @param obj 对象
  5. * @param property 键、路径
  6. * @param defaultValue 默认值
  7. */
  8. export declare function get(obj: any, property: string | string[], defaultValue?: any): any;
  9. declare module '../xe-utils' {
  10. interface XEUtilsMethods {
  11. /**
  12. * 获取对象的属性的值,如果值为 undefined,则返回默认值
  13. * @param obj 对象
  14. * @param property 键、路径
  15. * @param defaultValue 默认值
  16. */
  17. get: typeof get;
  18. }
  19. }
  20. export default get