fix(http): Update types for TypeScript nullability support
This commit is contained in:

committed by
Tobias Bosch

parent
86396a43e9
commit
c36ec9bf60
@ -10,7 +10,7 @@ import {Injectable} from '@angular/core';
|
||||
|
||||
let _nextRequestId = 0;
|
||||
export const JSONP_HOME = '__ng_jsonp__';
|
||||
let _jsonpConnections: {[key: string]: any} = null;
|
||||
let _jsonpConnections: {[key: string]: any}|null = null;
|
||||
|
||||
function _getJsonpConnections(): {[key: string]: any} {
|
||||
const w: {[key: string]: any} = typeof window == 'object' ? window : {};
|
||||
|
@ -115,7 +115,7 @@ export class XHRConnection implements Connection {
|
||||
if (!req.headers.has('Accept')) {
|
||||
req.headers.append('Accept', 'application/json, text/plain, */*');
|
||||
}
|
||||
req.headers.forEach((values, name) => _xhr.setRequestHeader(name, values.join(',')));
|
||||
req.headers.forEach((values, name) => _xhr.setRequestHeader(name !, values.join(',')));
|
||||
|
||||
// Select the correct buffer type to store the response
|
||||
if (req.responseType != null && _xhr.responseType != null) {
|
||||
|
Reference in New Issue
Block a user