Skip to main

isSink

isSink

Signature - source.ts#L347

function isSink(value: unknown): value is Sink<unknown>

Determines whether the given value is a Sink.

Parameters

ParameterTypeDescription
value
unknown

The value to check.

Returns

TypeDescription
value is Sink<unknown>

Whether the value is a Sink.

Example Usage

isSink(Sink(() => {})); // true.
isSink(Source(() => {})) // false.
isSink(Subject()); // true.
isSink(Disposable()); // false.
isSink({}); // false.
isSink(() => {}); // false.
isSink(null); // false.

See Also