"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.walkFieldSchema = void 0;
const index_js_1 = require("./core/index.js");
const schemaTypes_js_1 = require("./schemaTypes.js");
/**
 * Traverses all {@link TreeNodeSchema} schema reachable from `schema`, applying the visitor pattern.
 */
function walkFieldSchema(schema, visitor, visitedSet = new Set()) {
    (0, index_js_1.walkAllowedTypes)((0, schemaTypes_js_1.normalizeFieldSchema)(schema).allowedTypeSet, visitor, visitedSet);
}
exports.walkFieldSchema = walkFieldSchema;
//# sourceMappingURL=walkFieldSchema.js.map