type SupportPlatforms = 'wx' | 'ks' | 'tt' type State = 'start' | 'config' | 'copy' | 'view' | 'api' | 'style' | 'script' | 'log' | 'end' export type CommonResult = Partial<{ useNpm: boolean files: number transformedFiles: number apis: { unSupport: string[] support: string[] polyfill: string[] } tags: { unSupport: string[] support: string[] polyfill: string[] } attrs: { unSupport: string[] support: string[] } configs: { unSupport: string[] } diffs: Array<{ path: string; lines: number }> }> & { state: State transformErrors: { file: string; error: Error }[] } type Success = CommonResult & { type: 'success' } type Fail = CommonResult & { type: 'fail' error: Error } type Result = Fail | Success export type SceneType = 'miniProgram' | 'miniGame' export type Transform = ( config: { from: SupportPlatforms to: SupportPlatforms sourcePath: string targetPath: string outputFile?: string }, logger?: (...data: any[]) => void, onProgress?: (progress: number) => void, sceneType?: SceneType, limit?: number ) => Promise export declare const transform: Transform export declare const detectPlatform: (dirname: string) => Promise