/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
/** 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. */
export function getTreeNode(target) {
    if (typeof target === "object" && target !== null) {
        return target[treeNodeSym];
    }
    return undefined;
}
/** Helper to set the stored tree node. */
export 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,
    });
}
//# sourceMappingURL=types.js.map