mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
update angular-resource interceptor (#17919)
This commit is contained in:
16
types/angular-resource/index.d.ts
vendored
16
types/angular-resource/index.d.ts
vendored
@@ -53,6 +53,20 @@ declare module 'angular' {
|
||||
interface IActionHash {
|
||||
[action: string]: IActionDescriptor;
|
||||
}
|
||||
|
||||
interface IResourceResponse {
|
||||
config: any;
|
||||
data: any;
|
||||
headers: any;
|
||||
resource: any;
|
||||
status: number;
|
||||
statusText: string
|
||||
}
|
||||
|
||||
interface IResourceInterceptor {
|
||||
response?(response: IResourceResponse): any;
|
||||
responseError?(rejection: any): any;
|
||||
}
|
||||
|
||||
// Just a reference to facilitate describing new actions
|
||||
interface IActionDescriptor {
|
||||
@@ -73,7 +87,7 @@ declare module 'angular' {
|
||||
cancellable?: boolean;
|
||||
withCredentials?: boolean;
|
||||
responseType?: string;
|
||||
interceptor?: angular.IHttpInterceptor;
|
||||
interceptor?: IResourceInterceptor;
|
||||
}
|
||||
|
||||
// Allow specify more resource methods
|
||||
|
||||
Reference in New Issue
Block a user