"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.FieldSchema = exports.NodeKind = exports.FieldKind = exports.NodeBase = void 0;
/**
 * Base type which all nodes extend.
 * @beta
 */
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
class NodeBase {
}
exports.NodeBase = NodeBase;
/**
 * Kind of a field on a node.
 * @beta
 */
var FieldKind;
(function (FieldKind) {
    FieldKind[FieldKind["Optional"] = 0] = "Optional";
    FieldKind[FieldKind["Required"] = 1] = "Required";
})(FieldKind || (exports.FieldKind = FieldKind = {}));
/**
 * Kind of tree node.
 * @beta
 */
var NodeKind;
(function (NodeKind) {
    NodeKind[NodeKind["Map"] = 0] = "Map";
    NodeKind[NodeKind["List"] = 1] = "List";
    NodeKind[NodeKind["Object"] = 2] = "Object";
    NodeKind[NodeKind["Leaf"] = 3] = "Leaf";
})(NodeKind || (exports.NodeKind = NodeKind = {}));
/**
 * All policy for a specific field,
 * including functionality that does not have to be kept consistent across versions or deterministic.
 *
 * This can include policy for how to use this schema for "view" purposes, and well as how to expose editing APIs.
 * @sealed @beta
 */
class FieldSchema {
    /**
     * @param kind - The [kind](https://en.wikipedia.org/wiki/Kind_(type_theory)) of this field.
     * Determine the multiplicity, viewing and editing APIs as well as the merge resolution policy.
     * @param allowedTypes - What types of tree nodes are allowed in this field.
     */
    constructor(kind, allowedTypes) {
        this.kind = kind;
        this.allowedTypes = allowedTypes;
    }
}
exports.FieldSchema = FieldSchema;
//# sourceMappingURL=schemaTypes.js.map