Skip to main content

CommonProperty

Callable

  • CommonProperty<T>(propertyName: string, getter?: () => T, setter?: (T: any) => void): void

  • Defines a property with the given name and the passed setter and getter

    @example
    CommonDeprecate(
    "OldFunc",
    function NewFunc (a, b) { return a + b; },
    );

    Type parameters

    • T: unknown

    Parameters

    • propertyName: string

      The name for the new property

    • getter: () => T = undefined

      The getter function for the property

      • setter: (T: any) => void = undefined

        The setter function for the property

        Returns void