Skip to main content

ObservableLike

Framework-neutral subset of an Observable accepted from asynchronous validators.

Import​

import type { ObservableLike } from '@ngblocks/form-nodes';

When to use it​

Use for an async source compatible with the library without depending on RxJS types. Honor subscription cleanup so cancelled validation stops its work.

Declaration​

type ObservableLike<TValue> = {
subscribe(observer: ObserverLike<TValue>): SubscriptionLike;
};

Type parameters​

ParameterConstraintDefault
TValueUnconstrainedRequired

Declared members​

The declaration above also includes inherited contracts and overloads where applicable.

MemberMeaning
subscribeSubscribes the validation observer and returns a handle used for cancellation and cleanup.