Skip to content

Commit bf77095

Browse files
committed
Merge pull request DefinitelyTyped#8634 from wingyplus/angular-http-param-serializer
angularjs: Support HttpParamSerializer interface
2 parents b7d6485 + 5256422 commit bf77095

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

angularjs/angular-tests.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,3 +1110,10 @@ function doBootstrap(element: Element | JQuery, mode: string): ng.auto.IInjector
11101110
debugInfoEnabled: false
11111111
});
11121112
}
1113+
1114+
function testIHttpParamSerializerJQLikeProvider() {
1115+
let serializer: angular.IHttpParamSerializer;
1116+
serializer({
1117+
a: "b"
1118+
});
1119+
}

angularjs/angular.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1916,4 +1916,12 @@ declare namespace angular {
19161916
}
19171917

19181918
}
1919+
1920+
/**
1921+
* $http params serializer that converts objects to strings
1922+
* see https://docs.angularjs.org/api/ng/service/$httpParamSerializer
1923+
*/
1924+
interface IHttpParamSerializer {
1925+
(obj: Object): string;
1926+
}
19191927
}

0 commit comments

Comments
 (0)