Node TAP
    Preparing search index...

    Variable intercept

    intercept: <T extends object>(
        obj: T,
        prop: keyof T,
        desc?: PropertyDescriptor,
        strictMode?: boolean,
    ) => InterceptResultsMethod

    Type Declaration

      • <T extends object>(
            obj: T,
            prop: keyof T,
            desc?: PropertyDescriptor,
            strictMode?: boolean,
        ): InterceptResultsMethod
      • 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