/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { Assume } from "../../../util";
import { ObjectNodeSchema, TreeNodeSchema } from "../../typed-schema";
import { ProxyNode, SharedTreeObject } from "./types";
/**
 * Returns the content stored on an object created by a {@link SharedTreeObjectFactory}.
 */
export declare function getFactoryContent<TSchema extends ObjectNodeSchema>(x: SharedTreeObject<TSchema>): ProxyNode<TSchema> | undefined;
/**
 * Adds a factory function (`create`) to the given schema so that it satisfies the {@link SharedTreeObjectFactory} interface.
 */
export declare function addFactory<TSchema extends ObjectNodeSchema>(schema: TSchema): FactoryTreeSchema<TSchema>;
/**
 * Creates `{@link SharedTreeObject}`s of the given schema type via a `create` method.
 * @alpha
 */
export interface SharedTreeObjectFactory<TSchema extends TreeNodeSchema<string, unknown>> {
    /**
     * Create a {@link SharedTreeObject} that can be inserted into the tree via assignment `=`.
     * @param content - the data making up the {@link SharedTreeObject} to be created.
     * @remarks
     * The {@link SharedTreeObject} created by this function may _only_ be used for insertion into the tree.
     * It may not be read, mutated or queried in any way.
     */
    create(content: ProxyNode<Assume<TSchema, ObjectNodeSchema>, "javaScript">): SharedTreeObject<Assume<TSchema, ObjectNodeSchema>>;
}
/**
 * A {@link TreeNodeSchema} which is also a {@link SharedTreeObjectFactory}.
 * @alpha
 */
export type FactoryTreeSchema<TSchema extends TreeNodeSchema<string, unknown>> = TSchema & SharedTreeObjectFactory<TSchema>;
export declare const factoryObjectErrorMessage = "Newly created node must be inserted into the tree before being queried";
//# sourceMappingURL=objectFactory.d.ts.map