import ParsingError from './parsing_error';
import EvaluationContext from './evaluation_context';
import type { EvaluationKind } from './types';
import type { Value } from './values';
import type { Expression } from './expression';
import type { StylePropertySpecification } from '../style-spec';
import type { Result } from '../util/result';
import type { InterpolationType } from './definitions/interpolate';
import type { PropertyValueSpecification } from '../types';
import type { FormattedSection } from './types/formatted';
import type Point from '../../util/point';
import type { CanonicalTileID } from '../../source/tile_id';
export declare type Feature = {
    readonly type: 1 | 2 | 3 | 'Unknown' | 'Point' | 'MultiPoint' | 'LineString' | 'MultiLineString' | 'Polygon' | 'MultiPolygon';
    readonly id?: any;
    readonly properties: {
        [_: string]: any;
    };
    readonly patterns?: {
        [_: string]: {
            'min': string;
            'mid': string;
            'max': string;
        };
    };
    readonly geometry?: Array<Array<Point>>;
};
export declare type FeatureState = {
    [_: string]: any;
};
export declare type GlobalProperties = Readonly<{
    zoom: number;
    heatmapDensity?: number;
    lineProgress?: number;
    isSupportedScript?: (_: string) => boolean;
    accumulated?: Value;
}>;
export declare class StyleExpression {
    expression: Expression;
    _evaluator: EvaluationContext;
    _defaultValue: Value;
    _warningHistory: {
        [key: string]: boolean;
    };
    _enumValues: {
        [_: string]: any;
    } | undefined | null;
    constructor(expression: Expression, propertySpec?: StylePropertySpecification | null);
    evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection): any;
    evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection): any;
}
export declare function isExpression(expression: unknown): boolean;
/**
 * Parse and typecheck the given style spec JSON expression.  If
 * options.defaultValue is provided, then the resulting StyleExpression's
 * `evaluate()` method will handle errors by logging a warning (once per
 * message) and returning the default value.  Otherwise, it will throw
 * evaluation errors.
 *
 * @private
 */
export declare function createExpression(expression: unknown, propertySpec?: StylePropertySpecification | null): Result<StyleExpression, Array<ParsingError>>;
export declare class ZoomConstantExpression<Kind extends EvaluationKind> {
    kind: Kind;
    isStateDependent: boolean;
    _styleExpression: StyleExpression;
    constructor(kind: Kind, expression: StyleExpression);
    evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection): any;
    evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection): any;
}
export declare class ZoomDependentExpression<Kind extends EvaluationKind> {
    kind: Kind;
    zoomStops: Array<number>;
    isStateDependent: boolean;
    _styleExpression: StyleExpression;
    interpolationType: InterpolationType | undefined | null;
    constructor(kind: Kind, expression: StyleExpression, zoomStops: Array<number>, interpolationType?: InterpolationType);
    evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection): any;
    evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection): any;
    interpolationFactor(input: number, lower: number, upper: number): number;
}
export declare type ConstantExpression = {
    kind: 'constant';
    readonly evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>) => any;
};
export declare type SourceExpression = {
    kind: 'source';
    isStateDependent: boolean;
    readonly evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection) => any;
};
export declare type CameraExpression = {
    kind: 'camera';
    readonly evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>) => any;
    readonly interpolationFactor: (input: number, lower: number, upper: number) => number;
    zoomStops: Array<number>;
    interpolationType: InterpolationType | undefined | null;
};
export declare type CompositeExpression = {
    kind: 'composite';
    isStateDependent: boolean;
    readonly evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection) => any;
    readonly interpolationFactor: (input: number, lower: number, upper: number) => number;
    zoomStops: Array<number>;
    interpolationType: InterpolationType | undefined | null;
};
export declare type StylePropertyExpression = ConstantExpression | SourceExpression | CameraExpression | CompositeExpression;
export declare function createPropertyExpression(expressionInput: unknown, propertySpec: StylePropertySpecification): Result<StylePropertyExpression, Array<ParsingError>>;
export declare class StylePropertyFunction<T> {
    _parameters: PropertyValueSpecification<T>;
    _specification: StylePropertySpecification;
    kind: EvaluationKind;
    evaluate: (globals: GlobalProperties, feature?: Feature) => any;
    interpolationFactor: ((input: number, lower: number, upper: number) => number) | undefined | null;
    zoomStops: Array<number> | undefined | null;
    constructor(parameters: PropertyValueSpecification<T>, specification: StylePropertySpecification);
    static deserialize<T>(serialized: {
        _parameters: PropertyValueSpecification<T>;
        _specification: StylePropertySpecification;
    }): StylePropertyFunction<T>;
    static serialize<T>(input: StylePropertyFunction<T>): {
        _parameters: PropertyValueSpecification<T>;
        _specification: StylePropertySpecification;
    };
}
export declare function normalizePropertyExpression<T>(value: PropertyValueSpecification<T>, specification: StylePropertySpecification): StylePropertyExpression;
//# sourceMappingURL=index.d.ts.map