Function intercept

  • Intercept and track object property sets and gets.

    If a PropertyDescriptor is set, then it will be used as the replacement value. Otherwise, the original descriptor will be used.

    If the strictMode param is set, then attempts to write to read-only properties will throw an error.

    Type Parameters

    • T extends object

    Parameters

    • obj: T
    • prop: keyof T
    • Optionaldesc: PropertyDescriptor
    • OptionalstrictMode: boolean

    Returns InterceptResultsMethod