···11+import type ts from 'typescript';
22+33+import type { IR } from '../../../ir/types';
44+import type { ArktypePlugin } from '../types';
55+66+export type Ast = {
77+ expression: ts.Expression;
88+ hasCircularReference?: boolean;
99+ typeName?: string | ts.Identifier;
1010+};
1111+1212+export type IrSchemaToAstOptions = {
1313+ plugin: ArktypePlugin['Instance'];
1414+ state: State;
1515+};
1616+1717+export type State = {
1818+ /**
1919+ * Path to the schema in the intermediary representation.
2020+ */
2121+ _path: ReadonlyArray<string | number>;
2222+ circularReferenceTracker: Array<string>;
2323+ /**
2424+ * Works the same as `circularReferenceTracker`, but it resets whenever we
2525+ * walk inside another schema. This can be used to detect if a schema
2626+ * directly references itself.
2727+ */
2828+ currentReferenceTracker: Array<string>;
2929+ hasCircularReference: boolean;
3030+};
3131+3232+export type ValidatorArgs = {
3333+ operation: IR.OperationObject;
3434+ plugin: ArktypePlugin['Instance'];
3535+};