UNPKG

@netgrif/components-core

Version:

Netgrif Application engine frontend core Angular library

32 lines (31 loc) 1.41 kB
import { OnDestroy } from '@angular/core'; import { BehaviorSubject, Observable } from 'rxjs'; import * as i0 from "@angular/core"; export declare class BaseAllowedNetsService implements OnDestroy { protected _baseAllowedNets: BehaviorSubject<Array<string>>; private _sub; constructor(); ngOnDestroy(): void; /** * Sets the new identifiers of the base allowed nets * @param nets new base net identifiers */ set allowedNets(nets: Array<string>); /** * @deprecated This method should not be used. Use {@link BaseAllowedNetsService#allowedNets$} instead * @returns the currently set allowed nets. Returns an empty array if no value was set. */ get allowedNets(): Array<string>; /** * Subscribes to the provided `Observable` and forwards the emissions to the baseAllowedNets `Subject`. * If a new `Observable` is set, the previous Subscription is unsubscribed. * @param observableNets an observable emitting the new base net identifiers */ set allowedNets$(observableNets: Observable<Array<string>>); /** * @returns an observable that emits the currently set base allowed nets and any subsequent values */ get allowedNets$(): Observable<Array<string>>; static ɵfac: i0.ɵɵFactoryDeclaration<BaseAllowedNetsService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<BaseAllowedNetsService>; }