import { Feature } from './compat';
import { Options } from './context';
import { SerovalNode } from './tree/types';
import { AsyncServerValue, PrimitiveValue, ServerValue, CommonServerValue, SemiPrimitiveValue, ErrorValue } from './types';
export { AsyncServerValue, ServerValue, PrimitiveValue, CommonServerValue, SemiPrimitiveValue, ErrorValue, Feature, };
export declare function serialize<T extends ServerValue>(source: T, options?: Partial<Options>): string;
export declare function serializeAsync<T extends AsyncServerValue>(source: T, options?: Partial<Options>): Promise<string>;
export declare function deserialize<T extends AsyncServerValue>(source: string): T;
export interface SerovalJSON {
    t: SerovalNode;
    r: number;
    i: boolean;
    f: number;
    m: number[];
}
export declare function toJSON<T extends ServerValue>(source: T, options?: Partial<Options>): SerovalJSON;
export declare function toJSONAsync<T extends AsyncServerValue>(source: T, options?: Partial<Options>): Promise<SerovalJSON>;
export declare function compileJSON(source: SerovalJSON): string;
export declare function fromJSON<T extends AsyncServerValue>(source: SerovalJSON): T;
export default serialize;
