/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
/**
 * This file exists and is package exported to aid in testing of exporting recursive types across package boundaries.
 * Sometimes when TypeScript generates d.ts files, they type check significantly differently than the original source (One example of this: https://github.com/microsoft/TypeScript/issues/20979).
 * Unfortunately our recursive schema types are an example of types that have this kind of issue: the d.ts files tend to get "any" instead of the recursive type reference.
 * Currently we do not have tooling in place to test this in our test suite, and exporting these types here is a temporary crutch to aid in diagnosing this issue.
 */
import { SchemaFactoryRecursive } from "./schemaFactoryRecursive.js";
const builder = new SchemaFactoryRecursive("Test Recursive Domain");
/**
 * To make API-Extractor happy, the base type has to be exported in addition to the actual schema class.
 * Ideally this would be inlined into the class definition below.
 *
 * TODO:
 * Fix API-Extractor to support class based schema, and remove this workaround (inline this type into `RecursiveObject extends` below).
 * Error: src/class-tree/testRecursiveDomain.ts:32:1 - (ae-forgotten-export) The symbol "RecursiveObject_base" needs to be exported by the entry point index.d.ts
 * See https://github.com/microsoft/rushstack/issues/4429
 * @internal
 */
export const base = builder.objectRecursive("testObject", {
    recursive: builder.optionalRecursive([() => RecursiveObject]),
    number: builder.number,
});
/**
 * @internal
 */
export class RecursiveObject extends base {
}
/**
 * Due to https://github.com/microsoft/TypeScript/issues/55832 this is expected to compile to a d.ts file which contain `any`, and therefore the other (above) approach using class definitions is recommended for recursive schema.
 * See {@link SchemaFactory} for documentation covering this detail.
 * @internal
 */
export const RecursiveObjectPojoMode = builder.objectRecursive("testPOJOObject", {
    recursive: builder.optionalRecursive([() => RecursiveObjectPojoMode]),
    number: builder.number,
});
//# sourceMappingURL=testRecursiveDomain.js.map