update angular.d.ts

This commit is contained in:
vvakame
2014-10-27 11:22:46 +09:00
parent 3ec4b591c9
commit 0efa290ca6
2 changed files with 12 additions and 1 deletions

View File

@@ -250,6 +250,12 @@ httpFoo.then((x) => {
x.toFixed();
});
httpFoo.success((data, status, headers, config) => {
var h = headers("test");
h.charAt(0);
var hs = headers();
hs.concat(["test"]);
});
function test_angular_forEach() {
var values: { [key: string]: string } = { name: 'misko', gender: 'male' };

View File

@@ -1200,8 +1200,13 @@ declare module ng {
url: string;
}
interface IHttpHeadersGetter {
(): { [name: string]: string; };
(headerName: string): string;
}
interface IHttpPromiseCallback<T> {
(data: T, status: number, headers: (headerName?: string) => string, config: IRequestConfig): void;
(data: T, status: number, headers: IHttpHeadersGetter, config: IRequestConfig): void;
}
interface IHttpPromiseCallbackArg<T> {