of type '{ params: HttpParams; headers: HttpHeaders; observe: "body" | "response"; }' is not assignable to parameter of type '{ headers?: HttpHeaders; observe?: "body"; params?: HttpParams; reportProgress?: boolean; respons...'.
Types of property 'observe' are incompatible.
Type '"body" | "response"' is not assignable to type '"body"'.
Type '"response"' is not assignable to type '"body"'.
в коде у меня
http.get('some uri', {
observe: condition ? 'body' : 'response'
})
Это HttpClient, если что
https://github.com/Microsoft/TypeScript/issues/14107 😅
Обсуждают сегодня