diff --git a/packages/animations/browser/src/dsl/animation_timeline_builder.ts b/packages/animations/browser/src/dsl/animation_timeline_builder.ts index e4e9b90bdde..b20800e1ebc 100644 --- a/packages/animations/browser/src/dsl/animation_timeline_builder.ts +++ b/packages/animations/browser/src/dsl/animation_timeline_builder.ts @@ -615,8 +615,7 @@ export class AnimationTimelineContext { export class TimelineBuilder { public duration: number = 0; - // TODO(issue/24571): remove '!'. - public easing!: string|null; + public easing: string|null = null; private _previousKeyframe: ɵStyleDataMap = new Map(); private _currentKeyframe: ɵStyleDataMap = new Map(); private _keyframes = new Map(); diff --git a/packages/animations/browser/src/render/transition_animation_engine.ts b/packages/animations/browser/src/render/transition_animation_engine.ts index 9bbd8f5ee71..eee66263a16 100644 --- a/packages/animations/browser/src/render/transition_animation_engine.ts +++ b/packages/animations/browser/src/render/transition_animation_engine.ts @@ -1499,8 +1499,7 @@ export class TransitionAnimationPlayer implements AnimationPlayer { private _queuedCallbacks = new Map any)[]>(); public readonly destroyed = false; - // TODO(issue/24571): remove '!'. - public parentPlayer!: AnimationPlayer; + public parentPlayer: AnimationPlayer|null = null; public markedForDestroy: boolean = false; public disabled = false; diff --git a/packages/animations/browser/src/render/web_animations/web_animations_player.ts b/packages/animations/browser/src/render/web_animations/web_animations_player.ts index 59d201eb08e..bf772744a81 100644 --- a/packages/animations/browser/src/render/web_animations/web_animations_player.ts +++ b/packages/animations/browser/src/render/web_animations/web_animations_player.ts @@ -30,7 +30,7 @@ export class WebAnimationsPlayer implements AnimationPlayer { private _originalOnDoneFns: Function[] = []; private _originalOnStartFns: Function[] = []; - // TODO(issue/24571): remove '!'. + // using non-null assertion because it's re(set) by init(); public readonly domPlayer!: DOMAnimation; public time = 0; @@ -64,8 +64,8 @@ export class WebAnimationsPlayer implements AnimationPlayer { this._initialized = true; const keyframes = this.keyframes; - (this as {domPlayer: DOMAnimation}).domPlayer = - this._triggerWebAnimation(this.element, keyframes, this.options); + // @ts-expect-error overwriting a readonly property + this.domPlayer = this._triggerWebAnimation(this.element, keyframes, this.options); this._finalKeyframe = keyframes.length ? keyframes[keyframes.length - 1] : new Map(); this.domPlayer.addEventListener('finish', () => this._onFinish()); }