import { SourceFile } from 'ts-morph'; /** * Auto-generated types may contain circular references, like * ```typescript * type A = "a" | B * type B = "b" | A * ``` * These circular references likely do not exist in the grammar (since it could produce * a parser with an infinite loop). They were likely created when inferring types for a grammar * like * ``` * A = "a" / B * B = "b" / "(" A ")" * ``` * * This function attempts to detect and remove these circular references. * @param file */ export declare function pruneCircularReferences(file: SourceFile): void;