import { AstCollector, JsonSchema, KitaError, Provider, ProviderParser, Route, SourceFormatter, type KitaConfig, type ParameterParser, type RouteParser } from '@kitajs/common'; import { KitaPlugin } from '@kitajs/common/dist/ast/plugin'; import { ts } from 'ts-json-schema-generator'; import { SchemaBuilder } from './schema/builder'; export declare class KitaParser implements AstCollector { protected readonly config: KitaConfig; protected readonly program: ts.Program; /** A source formatter to call every time a route is generated */ protected readonly formatter?: SourceFormatter | undefined; protected readonly providers: Map; protected readonly routes: Map; protected readonly plugins: Map; protected readonly schemaBuilder: SchemaBuilder; readonly rootRouteParser: RouteParser; readonly rootParameterParser: ParameterParser; readonly rootProviderParser: ProviderParser; /** * Creates a KitaParser instance with the given config. * * You may pass a formatter to format the source code of the routes and providers. */ static create(config: KitaConfig, compilerOptions: ts.CompilerOptions, rootNames: string[], formatter?: SourceFormatter): KitaParser; static createWatcher(config: KitaConfig, compilerOptions: ts.CompilerOptions, formatter?: SourceFormatter): { ref: KitaParser; onChange?: ((parser: KitaParser) => Promise) | undefined; onError?: ((error: unknown) => void) | undefined; }; constructor(config: KitaConfig, program: ts.Program, /** A source formatter to call every time a route is generated */ formatter?: SourceFormatter | undefined); parse(): AsyncGenerator; getProvider(name: string): Provider | undefined; getProviders(): Provider[]; getProviderCount(): number; getRoute(operationId: string): Route | undefined; getRoutes(): Route[]; getRouteCount(): number; getSchema(ref: string): JsonSchema | undefined; getSchemas(): JsonSchema[]; getSchemaCount(): number; getPlugin(name: string): KitaPlugin | undefined; getPlugins(): KitaPlugin[]; getPluginCount(): number; addPlugin(name: string, plugin: KitaPlugin): void; getProgram(): ts.Program; } //# sourceMappingURL=parser.d.ts.map