"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.nodeApi = void 0;
const simple_tree_1 = require("../simple-tree");
// eslint-disable-next-line import/no-internal-modules
const proxies_1 = require("../simple-tree/proxies");
const toFlexSchema_1 = require("./toFlexSchema");
/**
 * The `Tree` object holds various functions for analyzing {@link NodeBase}s.
 * @beta
 */
exports.nodeApi = {
    ...simple_tree_1.Tree,
    is: (value, schema) => {
        return simple_tree_1.Tree.is(value, (0, toFlexSchema_1.getFlexSchema)(schema));
    },
    schema(node) {
        return (0, proxies_1.getClassSchema)(simple_tree_1.Tree.schema(node));
    },
};
//# sourceMappingURL=treeApi.js.map