isDisposable
Signature - disposable.ts#L364
function isDisposable(value: unknown): value is Disposable
Determines whether the given value is a Disposable.
Parameters
Parameter | Type | Description |
---|---|---|
value |
| The value to check. |
Returns
Type | Description |
---|---|
| Whether the value is a Disposable. |
Example Usage
isDisposable(Sink(() => {})); // true.
isDisposable(Source(() => {})) // false.
isDisposable(Subject()); // true.
isDisposable(Disposable()); // true.
isDisposable({}); // false.
isDisposable(() => {}); // false.
isDisposable(null); // false.