@atlaskit/util-service-support
Version:
A library of support classes for integrating React components with REST HTTP services
13 lines (12 loc) • 548 B
TypeScript
import { type OnProviderChange, type Provider } from './types';
export declare abstract class AbstractResource<Q, R, E, I, O> implements Provider<Q, R, E, I, O> {
private lastResult;
private listeners;
abstract filter(query?: Q, options?: O): void;
subscribe(onChange: OnProviderChange<R, E, I>): void;
unsubscribe(onChange: OnProviderChange<R, E, I>): void;
protected notifyResult(result: R): void;
protected notifyError(error: E): void;
protected notifyInfo(info: I): void;
protected notifyNotReady(): void;
}