UNPKG

@netgrif/components-core

Version:

Netgrif Application engine frontend core Angular library

27 lines (26 loc) 1.38 kB
import { Type } from '@angular/core'; import { Operator } from '../models/operator/operator'; import { Operators } from '../models/operator/operators'; import * as i0 from "@angular/core"; /** * A service that resolves {@link Operators} (or custom string) into a concrete (@link Operator) implementation class. */ export declare class OperatorResolverService { /** * Resolves the operators in the {@link Operators} enum into their corresponding classes. * Passes all unresolved values into the [toCustomClass()]{@link OperatorResolverService#toCustomClass} method. * @param operator a serialized representation of the {@link Operator} class */ toClass(operator: Operators | string): Type<Operator<any>> | undefined; /** * Should resolve any custom operators into their corresponding class objects. * * If you implement any custom {@link Operator} classes, you should override this method to resolve them after serialization. * * @param operator the serialized string provided by your [Operator.serialize()]{@link Operator#serialize} implementation * @returns `undefined` */ protected toCustomClass(operator: string): Type<Operator<any>> | undefined; static ɵfac: i0.ɵɵFactoryDeclaration<OperatorResolverService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<OperatorResolverService>; }