import type { EventEmitter } from '@angular/core'; import type { FormControl } from '@angular/forms'; import type { Translation } from './translation'; /** * Inputs of the component */ export interface ContextInput { [key: string]: any; } /** * Base outputs of the components */ export interface BaseContextOutput { [key: string]: any; } /** * Type helper to generate the interface of component outputs */ export type EventEmitterify = { [P in keyof T]: EventEmitter; }; /** * Context of the component */ export type Context = { [P in keyof T]: T[P]; } & EventEmitterify; /** * Type helper to generate the template context outputs */ export type Functionify = { [P in keyof T]: (value: T[P]) => void; }; /** * Interface for a context of a child component */ export interface TemplateContext, F extends BaseContextOutput = Record, W extends Translation = Translation> { /** Component configuration */ config?: Partial; /** Component inputs context */ inputs: { [T in keyof S]: S[T]; } & { [key: string]: any; }; /** Component outputs context */ outputs: Functionify; /** Component translation */ translations?: Partial; /** Parent Component Id */ parentId?: string; /** Form control object to be applied to the form */ formControl?: FormControl; } //# sourceMappingURL=context.d.ts.map