"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultSchemaPolicy = exports.neverTree = exports.emptyField = exports.neverField = void 0;
const core_1 = require("../core");
const defaultFieldKinds_1 = require("./defaultFieldKinds");
/**
 * FieldStoredSchema which is impossible for any data to be in schema with.
 */
exports.neverField = (0, core_1.fieldSchema)(defaultFieldKinds_1.value, []);
/**
 * FieldStoredSchema which is impossible to put anything in.
 * @alpha
 */
exports.emptyField = (0, core_1.fieldSchema)(defaultFieldKinds_1.forbidden, []);
/**
 * TreeStoredSchema which is impossible for any data to be in schema with.
 * @alpha
 */
exports.neverTree = {
    localFields: core_1.emptyMap,
    globalFields: core_1.emptySet,
    extraLocalFields: exports.neverField,
    extraGlobalFields: false,
    value: core_1.ValueSchema.Nothing,
};
/**
 * FullSchemaPolicy the default field kinds, empty default fields and neverTree for the default tree schema.
 *
 * This requires new node types to have explicit stored schema to exist in documents,
 * and allows adding new global fields along with their schema at any point.
 * @alpha
 */
exports.defaultSchemaPolicy = {
    fieldKinds: defaultFieldKinds_1.fieldKinds,
    defaultTreeSchema: exports.neverTree,
    defaultGlobalFieldSchema: exports.emptyField,
};
//# sourceMappingURL=defaultSchema.js.map