Skip to main

implDisposableMethods

implDisposableMethods

Signature - disposable.ts#L217

function implDisposableMethods<T extends object>(
    value: T,
    disposable: Disposable,
): T & Disposable

Implements the Disposable Interface onto the given value by copying the disposable methods & properties from the given value to the given disposable.

Parameters

ParameterTypeDescription
value
T

The value to implement the Disposable Interface on.

disposable
Disposable

Returns

TypeDescription
T & Disposable

The given value which has been mutated. In strict javascript this is unnecessary but here it is useful as the returned value will have the type T & Disposable