/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { assert } from "@fluidframework/common-utils";
import { rootFieldKey, } from "../../core";
/**
 * The key used for the field that contains the root of chunks when not parented anywhere.
 *
 * For now this is using the document root key to ease testing/compatibility, but this may change.
 */
export const dummyRoot = rootFieldKey;
/**
 * A symbol for extracting a TreeChunk from {@link ITreeCursor}.
 */
export const cursorChunk = Symbol("cursorChunk");
/**
 * See {@link WithChunk}.
 */
export function tryGetChunk(cursor) {
    assert(cursor.mode === 0 /* Nodes */, 0x57b /* cursorChunk only accessible in nodes mode */);
    return cursor[cursorChunk];
}
//# sourceMappingURL=chunk.js.map