right-angled
Version:
Lightweight and easy to use angular data grids. Integrates with your markup and styles rather than generating its own.
76 lines • 2.62 kB
TypeScript
import * as i0 from "@angular/core";
/**
* Contract to implement abstracted subscription proxy which hides any details of underlying subscription
*/
export interface SubscriptionProxy {
/**
* Subscribes to passed object
* @param target object to subscribe
* @param completeAction action to call on underlying subscription successful completion
* @param errorAction action to call on underlying subscription error
*/
attach(target: any, completeAction: any, errorAction: any): any;
/**
* Detaches from underlying subscription
*/
detach(subscription: any): void;
}
/**
* Implementation of {@link SubscriptionProxy} to work with any objects with `subscribe/unsubscribe` contracts. This contract is suitable for Observable, for example.
*/
export declare class PushBasedSubscriptionProxy implements SubscriptionProxy {
/**
* Returns `true` if this proxy type can subscribe to passed object. `false` otherwise.
*/
static isAcceptable(target: any): boolean;
/**
* @inheritdoc
*/
attach(target: any, completeAction: any, errorAction?: (error: any) => any): any;
/**
* @inheritdoc
*/
detach(subscription: any): void;
}
/**
* Implementation of {@link SubscriptionProxy} which works with Promise and adds ability to unsubscribe from it.
*/
export declare class PromiseSubscriptionProxy implements SubscriptionProxy {
private isAlive;
/**
* Returns `true` if this proxy type can subscribe to passed object. `false` otherwise.
*/
static isAcceptable(target: any): boolean;
/**
* @inheritdoc
*/
attach(target: Promise<any>, completeAction: (value: any) => any, errorAction?: (error: any) => any): any;
/**
* @inheritdoc
*/
detach(subscription: any): void;
}
/**
* Service to manage async subscriptions which acts as mediator to {@link SubscriptionProxy} contract implementations.
*/
export declare class AsyncSubscriber {
private proxy;
private lastTarget;
private subscription;
/**
* @see {@link SubscriptionProxy.attach}
*/
attach(target: any, completeAction: (value: any) => any, errorAction?: (error: any) => any): void;
/**
* Detaches from underlying subscription and destroys all internal objects.
*/
destroy(): void;
/**
* @see {@link SubscriptionProxy.detach}
*/
detach(): void;
private getProxy;
static ɵfac: i0.ɵɵFactoryDeclaration<AsyncSubscriber, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<AsyncSubscriber>;
}
//# sourceMappingURL=async-subscriber.d.ts.map