"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.setTreeNode = exports.getTreeNode = void 0;
/** Symbol used to store a private/internal reference to the underlying editable tree node. */
const treeNodeSym = Symbol("TreeNode");
/** Helper to retrieve the stored tree node. */
function getTreeNode(target) {
    if (typeof target === "object" && target !== null) {
        return target[treeNodeSym];
    }
    return undefined;
}
exports.getTreeNode = getTreeNode;
/** Helper to set the stored tree node. */
function setTreeNode(target, treeNode) {
    Object.defineProperty(target, treeNodeSym, {
        value: treeNode,
        // TODO: Investigate if this can be removed by properly implementing key-related traps in the proxy
        configurable: true,
    });
}
exports.setTreeNode = setTreeNode;
//# sourceMappingURL=types.js.map