1 | /**
|
---|
2 | * @license
|
---|
3 | * Copyright Google LLC All Rights Reserved.
|
---|
4 | *
|
---|
5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
6 | * found in the LICENSE file at https://angular.io/license
|
---|
7 | */
|
---|
8 | (function (factory) {
|
---|
9 | if (typeof module === "object" && typeof module.exports === "object") {
|
---|
10 | var v = factory(require, exports);
|
---|
11 | if (v !== undefined) module.exports = v;
|
---|
12 | }
|
---|
13 | else if (typeof define === "function" && define.amd) {
|
---|
14 | define("@angular/core/schematics/migrations/static-queries/angular/super_class", ["require", "exports"], factory);
|
---|
15 | }
|
---|
16 | })(function (require, exports) {
|
---|
17 | "use strict";
|
---|
18 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
19 | exports.getSuperClassDeclarations = void 0;
|
---|
20 | /**
|
---|
21 | * Gets all chained super-class TypeScript declarations for the given class
|
---|
22 | * by using the specified class metadata map.
|
---|
23 | */
|
---|
24 | function getSuperClassDeclarations(classDecl, classMetadataMap) {
|
---|
25 | const declarations = [];
|
---|
26 | let current = classMetadataMap.get(classDecl);
|
---|
27 | while (current && current.superClass) {
|
---|
28 | declarations.push(current.superClass);
|
---|
29 | current = classMetadataMap.get(current.superClass);
|
---|
30 | }
|
---|
31 | return declarations;
|
---|
32 | }
|
---|
33 | exports.getSuperClassDeclarations = getSuperClassDeclarations;
|
---|
34 | });
|
---|
35 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3VwZXJfY2xhc3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9jb3JlL3NjaGVtYXRpY3MvbWlncmF0aW9ucy9zdGF0aWMtcXVlcmllcy9hbmd1bGFyL3N1cGVyX2NsYXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRzs7Ozs7Ozs7Ozs7OztJQUtI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