forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ng-file-upload.d.ts
32 lines (23 loc) · 954 Bytes
/
ng-file-upload.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Type definitions for Angular File Upload 4.2.1
// Project: https://github.com/danialfarid/ng-file-upload
// Definitions by: John Reilly <https://github.com/johnnyreilly>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts" />
declare module angular.angularFileUpload {
interface IUploadService {
http<T>(config: IRequestConfig): IUploadPromise<T>;
upload<T>(config: IFileUploadConfig): IUploadPromise<T>;
}
interface IUploadPromise<T> extends IHttpPromise<T> {
abort(): IUploadPromise<T>;
progress(callback: IHttpPromiseCallback<T>): IUploadPromise<T>;
xhr(callback: IHttpPromiseCallback<T>): IUploadPromise<T>;
}
interface IFileUploadConfig extends IRequestConfig {
file: File;
fileName?: string;
}
interface IFileProgressEvent extends ProgressEvent {
config: IFileUploadConfig;
}
}