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