• Creates a Proxy for patched event and properties on the target. All patches from the provided factory list will be used in creating a proxy chain. Each patch is applied in order, and patches can rely on their target having been patched with all previous patches.

    Type Parameters

    Parameters

    • target: T
    • Rest...patchFactories: PatchFactory<T, EventMap>[]

      A list of factories that each produce a new patch for the target.

    Returns PatchedRef<T>

    Returns a disposable object with a Proxy reference with overridden event and property behavior. When disposed, the event listeners are removed.