Skip to main content

CommonProperty

Callable

  • CommonProperty<T>(propertyName: string, getter?: () => T, setter?: (args: T) => 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: readonly any[]

    Parameters

    • propertyName: string

      The name for the new property

    • optionalgetter: () => T = undefined

      The getter function for the property

      • optionalsetter: (args: T) => void = undefined

        The setter function for the property

        Returns void