docs: change docs for get request return object type checking (#34845)

earlier in the docs it was told that adding typescript's type checking make json response typed so changed docs to say that it adds all typescipt capabilities during compile time

Fixes #34746

PR Close #34845
This commit is contained in:
ajitsinghkaler 2020-01-20 23:32:21 +05:30 committed by Matias Niemelä
parent 4dbc871169
commit fae5c521d8
1 changed files with 1 additions and 1 deletions

View File

@ -140,7 +140,7 @@ This particular `HttpClient.get()` call returns an `Observable<Hero[]>`; that is
### `HttpClient.get()` returns response data ### `HttpClient.get()` returns response data
`HttpClient.get()` returns the body of the response as an untyped JSON object by default. `HttpClient.get()` returns the body of the response as an untyped JSON object by default.
Applying the optional type specifier, `<Hero[]>` , gives you a typed result object. Applying the optional type specifier, `<Hero[]>` , adds TypeScript capabilities, which reduce errors during compile time.
The server's data API determines the shape of the JSON data. The server's data API determines the shape of the JSON data.
The _Tour of Heroes_ data API returns the hero data as an array. The _Tour of Heroes_ data API returns the hero data as an array.