mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
a7bde662c3
The AnimationClassBindingFn type was too restrictive, only allowing `string | string[]`. However, the runtime (`getClassListFromValue`) safely handles `undefined` and `null` values by treating them as no animation. This change updates the type to allow `undefined` and `null`, which is consistent with other class/style bindings in Angular and avoids requiring workarounds (like empty strings) in host bindings. Added a compliance test case to verify that `[animate.enter]` with a potentially `undefined` value compiles correctly.