import { ScalarFunction } from "./attributes"; import { InheritedAttributeEvaluator } from "./inherited"; import { ReificationOptions } from "./options"; import { SyntheticAttributeEvaluator } from "./synthetic"; export interface BaseAttributeDefinition { description: string; opts: Partial; } export interface SyntheticAttributeDefinition extends BaseAttributeDefinition { type: "syn"; f: SyntheticAttributeEvaluator; } export declare function synthetic(description: string, f: SyntheticAttributeEvaluator, opts?: Partial): SyntheticAttributeDefinition; export interface InheritedAttributeDefinition extends BaseAttributeDefinition { type: "inh"; f: InheritedAttributeEvaluator; } export interface InheritedOptions { /** Whether the inherited attribute should be eagerly evaluated (default: true) */ eager: boolean; /** Whether the inherited attribute should be cached (default: true) */ cached: boolean; } export declare function inherited(description: string, f: InheritedAttributeEvaluator, opts?: Partial): InheritedAttributeDefinition; export interface DerivedAttributeDefinition extends BaseAttributeDefinition { type: "der"; f: ScalarFunction; } export declare function derived(description: string, f: ScalarFunction): DerivedAttributeDefinition; export interface TransformerAttributeDefinition extends BaseAttributeDefinition { type: "trans"; attr: AttributeDefinition; f: ScalarFunction; } export declare function transformer(attr: AttributeDefinition, name: string, f: ScalarFunction): TransformerAttributeDefinition; export declare type AttributeDefinition = SyntheticAttributeDefinition | InheritedAttributeDefinition | DerivedAttributeDefinition | TransformerAttributeDefinition; export declare type AttributeEvaluator = SyntheticAttributeEvaluator | InheritedAttributeEvaluator | ScalarFunction;