Files
Kristiyan Kostadinov 6df314f3d9 refactor(animations): remove unnecessary code (#44378)
* The `TransitionAnimationEngine` had a fallback where it would store classes directly on a node if it doesn't have a `classList`. Presumably this is to support old browsers or if an animation is set on something like `ng-container`. This information was never used for anything since `containsClass` was never called. These changes simplify the logic to just a null check.
* Deprecates the `AnimationDriver.matchesElement` method, because it was only used in one place which can be replaced with `classList.contains`. We can't remove the method completely, because `AnimationDriver` is a public API. We also can't turn it into a method on the base class in order to remove it from the sub-classes, because it can break apps using `noImplicitOverride` while extending `AnimationDriver`.

PR Close #44378
2021-12-08 13:23:40 -05:00

1.0 KiB

API Report File for "@angular/animations_browser"

Do not edit this file. It is a report generated by API Extractor.


// @public (undocumented)
export abstract class AnimationDriver {
    // (undocumented)
    abstract animate(element: any, keyframes: {
        [key: string]: string | number;
    }[], duration: number, delay: number, easing?: string | null, previousPlayers?: any[], scrubberAccessRequested?: boolean): any;
    // (undocumented)
    abstract computeStyle(element: any, prop: string, defaultValue?: string): string;
    // (undocumented)
    abstract containsElement(elm1: any, elm2: any): boolean;
    // @deprecated (undocumented)
    abstract matchesElement(element: any, selector: string): boolean;
    // (undocumented)
    static NOOP: AnimationDriver;
    // (undocumented)
    abstract query(element: any, selector: string, multi: boolean): any[];
    // (undocumented)
    abstract validateStyleProperty(prop: string): boolean;
}

// (No @packageDocumentation comment for this package)