Skip to content

Commit de93ab8

Browse files
committed
refactor(platform-browser): handle angular#24571 todos
This commit removes the remaining TODO(issue/24571) in platform-browser code base.
1 parent 7e35a91 commit de93ab8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/platform-browser/src/dom/events/event_manager.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ export class EventManager {
3232
* Initializes an instance of the event-manager service.
3333
*/
3434
constructor(@Inject(EVENT_MANAGER_PLUGINS) plugins: EventManagerPlugin[], private _zone: NgZone) {
35-
plugins.forEach(p => p.manager = this);
35+
plugins.forEach((plugin) => {
36+
plugin.manager = this;
37+
});
3638
this._plugins = plugins.slice().reverse();
3739
}
3840

@@ -94,7 +96,7 @@ export class EventManager {
9496
export abstract class EventManagerPlugin {
9597
constructor(private _doc: any) {}
9698

97-
// TODO(issue/24571): remove '!'.
99+
// Using non-null assertion because it's set by EventManager's constructor
98100
manager!: EventManager;
99101

100102
abstract supports(eventName: string): boolean;

packages/platform-browser/test/testing_public_spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
import {ResourceLoader} from '@angular/compiler';
10-
import {Compiler, Component, ComponentFactoryResolver, CUSTOM_ELEMENTS_SCHEMA, Directive, Inject, Injectable, InjectionToken, Injector, Input, NgModule, Optional, Pipe, SkipSelf, Type, ɵstringify as stringify} from '@angular/core';
10+
import {Compiler, Component, ComponentFactoryResolver, CUSTOM_ELEMENTS_SCHEMA, Directive, Inject, Injectable, InjectionToken, Injector, Input, NgModule, Optional, Pipe, SkipSelf, Type} from '@angular/core';
1111
import {fakeAsync, getTestBed, inject, TestBed, tick, waitForAsync, withModule} from '@angular/core/testing';
1212
import {expect} from '@angular/platform-browser/testing/src/matchers';
1313

@@ -92,7 +92,6 @@ class TestViewProvidersComp {
9292

9393
@Directive({selector: '[someDir]', host: {'[title]': 'someDir'}})
9494
class SomeDirective {
95-
// TODO(issue/24571): remove '!'.
9695
@Input() someDir!: string;
9796
}
9897

@@ -762,7 +761,6 @@ const bTok = new InjectionToken<string>('b');
762761
testDir = this;
763762
}
764763

765-
// TODO(issue/24571): remove '!'.
766764
@Input('test') test!: string;
767765
}
768766

0 commit comments

Comments
 (0)