Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Objects

Obejct helper class
对象工具类

Hierarchy

  • Objects

Index

Methods

Static readonly

  • readonly(obj: object, props: string | string[]): void
  • Read only on an object's properties.

    Parameters

    • obj: object
    • props: string | string[]

      property names

    Returns void

Static readwrite

  • readwrite<T>(obj: T, props: string | string[], listeners?: { changed?: (this: T, propName: string, newVal: any, oldVal: any) => void; changing?: (this: T, propName: string, newVal: any, oldVal: any) => void | any }): void
  • Readable or writeable on an object's properties and listen changing and changed events when its value be changed.

    Type parameters

    • T

    Parameters

    • obj: T
    • props: string | string[]

      property names

    • Optional listeners: { changed?: (this: T, propName: string, newVal: any, oldVal: any) => void; changing?: (this: T, propName: string, newVal: any, oldVal: any) => void | any }
      • Optional changed?: (this: T, propName: string, newVal: any, oldVal: any) => void
          • (this: T, propName: string, newVal: any, oldVal: any): void
          • Parameters

            • this: T
            • propName: string
            • newVal: any
            • oldVal: any

            Returns void

      • Optional changing?: (this: T, propName: string, newVal: any, oldVal: any) => void | any
          • (this: T, propName: string, newVal: any, oldVal: any): void | any
          • Parameters

            • this: T
            • propName: string
            • newVal: any
            • oldVal: any

            Returns void | any

    Returns void