import { AdapterType, JSONAdapter, JSONOptions } from './types.js'; /** * Factory for creating JSON adapters * * @example * ```typescript * // Auto-select best available adapter * const json = JSONFactory.create(); * * // Force native adapter * const native = JSONFactory.create({ adapter: 'native' }); * * // Force sonic, throw if unavailable * const sonic = JSONFactory.create({ adapter: 'sonic', fallback: false }); * ``` */ export declare class JSONFactory { /** * Create a new JSON adapter instance * * @param options - Configuration options * @returns A JSON adapter instance * @throws Error if requested adapter is unavailable and fallback is false */ static create(options?: JSONOptions): JSONAdapter; /** * Get the default adapter instance (cached singleton) * * Uses 'auto' mode to select the best available adapter. * The instance is cached for subsequent calls. */ static getDefault(): JSONAdapter; /** * Reset the default adapter (useful for testing) * @internal */ static resetDefault(): void; /** * Check if a specific adapter type is available */ static isAvailable(adapter: AdapterType): boolean; /** * Get the name of the adapter that would be used with given options */ static getAdapterName(options?: JSONOptions): 'sonic' | 'native'; } /** * Get the default JSON adapter * * Convenience function that returns JSONFactory.getDefault() */ export declare function getDefaultAdapter(): JSONAdapter; /** * Create a new JSON adapter * * Convenience function that calls JSONFactory.create() */ export declare function createAdapter(options?: JSONOptions): JSONAdapter; //# sourceMappingURL=factory.d.ts.map