fix(platform-browser): Update types for TypeScript nullability support

Closes #15898
This commit is contained in:
Miško Hevery
2017-03-24 09:59:41 -07:00
committed by Tobias Bosch
parent 01d93f3af8
commit 728c9d0632
52 changed files with 169 additions and 154 deletions

View File

@ -12,7 +12,7 @@ import {ɵgetDOM as getDOM} from '@angular/platform-browser';
export let browserDetection: BrowserDetection;
export class BrowserDetection {
private _overrideUa: string;
private _overrideUa: string|null;
private get _ua(): string {
if (typeof this._overrideUa === 'string') {
return this._overrideUa;
@ -23,7 +23,7 @@ export class BrowserDetection {
static setup() { browserDetection = new BrowserDetection(null); }
constructor(ua: string) { this._overrideUa = ua; }
constructor(ua: string|null) { this._overrideUa = ua; }
get isFirefox(): boolean { return this._ua.indexOf('Firefox') > -1; }