// Type definitions for ngCordova file-transfer plugin // Project: https://github.com/driftyco/ng-cordova // Definitions by: Phil McCloghry-Laing // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// /// /// declare namespace ngCordova { export interface IFileTransferService { download(url: string, filePath: string, options?: IFileDownloadOptions, trustAllHosts?: boolean): IFileTransferPromise; upload(url: string, filePath: string, options?: IFileUploadOptions, trustAllHosts?: boolean): IFileTransferPromise; } export interface IFileTransferPromise extends ng.IPromise { then(successCallback: (promiseValue: T) => ng.IPromise | TResult, errorCallback?: (error: FileTransferError) => ng.IPromise | TResult, notifyCallback?: (state: any) => any): ng.IPromise; catch(onRejected: (error: FileTransferError) => ng.IPromise | TResult): ng.IPromise; } export interface IFileDownloadOptions extends FileDownloadOptions { encodeURI?: boolean; timeout?: number; } export interface IFileUploadOptions extends FileUploadOptions { encodeURI?: boolean; timeout?: number; } }