refactor(core): move schematic base classes logic into shared utils (#35339)
Moves the `findBaseClassDeclarations` method into the shared schematic utilities. This method will be useful for future migrations, and for planned changes to the `undecorated-classes-with-decorated-fields` migration. PR Close #35339
This commit is contained in:
parent
e9de28111d
commit
8e55a11283
|
@ -13,11 +13,11 @@ import * as ts from 'typescript';
|
||||||
|
|
||||||
import {getAngularDecorators} from '../../utils/ng_decorators';
|
import {getAngularDecorators} from '../../utils/ng_decorators';
|
||||||
import {hasExplicitConstructor} from '../../utils/typescript/class_declaration';
|
import {hasExplicitConstructor} from '../../utils/typescript/class_declaration';
|
||||||
|
import {findBaseClassDeclarations} from '../../utils/typescript/find_base_classes';
|
||||||
import {getImportOfIdentifier} from '../../utils/typescript/imports';
|
import {getImportOfIdentifier} from '../../utils/typescript/imports';
|
||||||
|
|
||||||
import {UnexpectedMetadataValueError, convertDirectiveMetadataToExpression} from './decorator_rewrite/convert_directive_metadata';
|
import {UnexpectedMetadataValueError, convertDirectiveMetadataToExpression} from './decorator_rewrite/convert_directive_metadata';
|
||||||
import {DecoratorRewriter} from './decorator_rewrite/decorator_rewriter';
|
import {DecoratorRewriter} from './decorator_rewrite/decorator_rewriter';
|
||||||
import {findBaseClassDeclarations} from './find_base_classes';
|
|
||||||
import {ImportManager} from './import_manager';
|
import {ImportManager} from './import_manager';
|
||||||
import {hasDirectiveDecorator, hasInjectableDecorator} from './ng_declaration_collector';
|
import {hasDirectiveDecorator, hasInjectableDecorator} from './ng_declaration_collector';
|
||||||
import {UpdateRecorder} from './update_recorder';
|
import {UpdateRecorder} from './update_recorder';
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as ts from 'typescript';
|
import * as ts from 'typescript';
|
||||||
import {getBaseTypeIdentifiers} from '../../utils/typescript/class_declaration';
|
import {getBaseTypeIdentifiers} from './class_declaration';
|
||||||
|
|
||||||
/** Gets all base class declarations of the specified class declaration. */
|
/** Gets all base class declarations of the specified class declaration. */
|
||||||
export function findBaseClassDeclarations(node: ts.ClassDeclaration, typeChecker: ts.TypeChecker) {
|
export function findBaseClassDeclarations(node: ts.ClassDeclaration, typeChecker: ts.TypeChecker) {
|
Loading…
Reference in New Issue