/** * The published package's `types` entry points at a file that is not shipped in * 0.1.3, so declare the small surface we use here. */ declare module '@neoanaloglabkk/lensfun-wasm' { export interface LensfunInitOptions { moduleFactory?: (options?: Record) => Promise; moduleJsUrl?: string; wasmUrl?: string; dataUrl?: string; dbPath?: string; autoInitDb?: boolean; locateFile?: (path: string, prefix: string) => string; } export interface LensMatch { handle: number; maker: string; model: string; score: number; minFocal: number; maxFocal: number; minAperture: number; maxAperture: number; cropFactor: number; } export interface CameraMatch { maker: string; model: string; variant: string; mount: string; cropFactor: number; score: number; } export interface SearchLensesInput { lensMaker?: string; lensModel: string; cameraMaker?: string; cameraModel?: string; searchFlags?: number; } export interface SearchCamerasInput { maker?: string; model?: string; searchFlags?: number; } export interface CorrectionInput { lensHandle: number; width: number; height: number; focal: number; crop: number; step?: number; reverse?: boolean; includeTca?: boolean; includeVignetting?: boolean; aperture?: number; distance?: number; } export interface CorrectionMaps { gridWidth: number; gridHeight: number; step: number; geometry: Float32Array; tca?: Float32Array; vignetting?: Float32Array; } export interface LensfunClient { dispose(): void; searchLenses(input: SearchLensesInput): LensMatch[]; searchCameras(input: SearchCamerasInput): CameraMatch[]; getAvailableModifications(lensHandle: number, crop: number): number; buildCorrectionMaps(input: CorrectionInput): CorrectionMaps; } export function createLensfun(options?: LensfunInitOptions): Promise; }