/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { createRawNodeProxy } from "./proxies";
/**
 * Adds a factory function (`create`) to the given schema so that it satisfies the {@link TreeObjectFactory} interface.
 */
export function addFactory(schema) {
    return Object.defineProperty(schema, "create", {
        value: (content) => createRawNodeProxy(schema, content, false),
        configurable: true,
        enumerable: true,
    });
}
//# sourceMappingURL=objectFactory.js.map