Repository navigation
Conversation
b122106 to
e68dd76
Compare
`HttpClient` has a lot of overloads to achieve proper type checking, however each overload is also very long which makes it hard to read on adev. These changes replace the object literal types with `Record` to make them a bit more concise.
e68dd76 to
a5fc4a2
Compare
|
Could there be exported type for the param value For consistency, |
|
@rubiesonthesky that's actually what I had in the first version of this PR. I ended up reverting it, because it didn't make much of a difference in the display type on angular.dev. There seems to be some logic that truncates long types. |
|
Don't take me seriously, but let a: {[k:string]: string} = {}; // 33 chars
let b: Record<string, string> = {}; // 35 chars
let c: {[key:string]: string} = {}; // 35 chars |
pkozlowski-opensource
left a comment
There was a problem hiding this comment.
LGTM
Reviewed-for: fw-general
Reviewed-for: public-api
kirjs
left a comment
There was a problem hiding this comment.
Reviewed-for: fw-general
Reviewed-for: public-api
|
This PR was merged into the repository by commit 07338c0. The changes were merged into the following branches: main, 19.1.x, 19.2.x |
`HttpClient` has a lot of overloads to achieve proper type checking, however each overload is also very long which makes it hard to read on adev. These changes replace the object literal types with `Record` to make them a bit more concise. PR Close #59901
`HttpClient` has a lot of overloads to achieve proper type checking, however each overload is also very long which makes it hard to read on adev. These changes replace the object literal types with `Record` to make them a bit more concise. PR Close #59901

HttpClienthas a lot of overloads to achieve proper type checking, however each overload is also very long which makes it hard to read on adev. These changes replace the object literal types withRecordto make them a bit more concise.