refactor(core): move schematic typescript logic to utility package (#29608)

PR Close #29608
This commit is contained in:
Paul Gschwendtner 2019-03-28 11:24:02 +01:00 committed by Jason Aden
parent 5a724b34bd
commit 780081def0
15 changed files with 10 additions and 20 deletions

View File

@ -7,13 +7,11 @@
*/
import * as ts from 'typescript';
import {hasPropertyNameText} from '../typescript/property_name';
import {hasPropertyNameText} from '../../../utils/typescript/property_name';
import {DeclarationUsageVisitor} from './declaration_usage_visitor';
import {ClassMetadataMap} from './ng_query_visitor';
import {NgQueryDefinition, QueryTiming, QueryType} from './query-definition';
/**
* Object that maps a given type of query to a list of lifecycle hooks that
* could be used to access such a query statically.

View File

@ -7,7 +7,7 @@
*/
import * as ts from 'typescript';
import {isFunctionLikeDeclaration, unwrapExpression} from '../typescript/functions';
import {isFunctionLikeDeclaration, unwrapExpression} from '../../../utils/typescript/functions';
/**
* Class that can be used to determine if a given TypeScript node is used within

View File

@ -7,9 +7,8 @@
*/
import * as ts from 'typescript';
import {getPropertyNameText, hasPropertyNameText} from '../typescript/property_name';
import {getAngularDecorators} from './decorators';
import {getAngularDecorators} from '../../../utils/ng_decorators';
import {getPropertyNameText, hasPropertyNameText} from '../../../utils/typescript/property_name';
/** Analyzes the given class and resolves the name of all inputs which are declared. */
export function getInputNamesOfClass(

View File

@ -7,10 +7,8 @@
*/
import * as ts from 'typescript';
import {findParentClassDeclaration, getBaseTypeIdentifiers} from '../typescript/class_declaration';
import {getAngularDecorators} from './decorators';
import {getAngularDecorators} from '../../../utils/ng_decorators';
import {findParentClassDeclaration, getBaseTypeIdentifiers} from '../../../utils/typescript/class_declaration';
import {getInputNamesOfClass} from './directive_inputs';
import {NgQueryDefinition, QueryType} from './query-definition';

View File

@ -7,8 +7,7 @@
*/
import * as ts from 'typescript';
import {NgDecorator} from './decorators';
import {NgDecorator} from '../../../utils/ng_decorators';
/** Timing of a given query. Either static or dynamic. */
export enum QueryTiming {

View File

@ -8,7 +8,6 @@
import {Replacement, RuleFailure, Rules} from 'tslint';
import * as ts from 'typescript';
import {analyzeNgQueryUsage} from '../angular/analyze_query_usage';
import {NgQueryResolveVisitor} from '../angular/ng_query_visitor';
import {QueryTiming} from '../angular/query-definition';

View File

@ -11,11 +11,11 @@ import {dirname, relative} from 'path';
import * as ts from 'typescript';
import {getProjectTsConfigPaths} from '../../utils/project_tsconfig_paths';
import {parseTsconfigFile} from '../../utils/typescript/parse_tsconfig';
import {analyzeNgQueryUsage} from './angular/analyze_query_usage';
import {NgQueryResolveVisitor} from './angular/ng_query_visitor';
import {getTransformedQueryCallExpr} from './transform';
import {parseTsconfigFile} from './typescript/tsconfig';
/** Entry point for the V8 static-query migration. */

View File

@ -7,10 +7,8 @@
*/
import * as ts from 'typescript';
import {getPropertyNameText} from '../../utils/typescript/property_name';
import {NgQueryDefinition, QueryTiming} from './angular/query-definition';
import {getPropertyNameText} from './typescript/property_name';
/**
* Transforms the given query decorator by explicitly specifying the timing based on the

View File

@ -7,7 +7,7 @@
*/
import * as ts from 'typescript';
import {getCallDecoratorImport} from '../typescript/decorators';
import {getCallDecoratorImport} from './typescript/decorators';
export interface NgDecorator {
name: string;

View File

@ -7,7 +7,6 @@
*/
import * as ts from 'typescript';
import {Import, getImportOfIdentifier} from './imports';
export function getCallDecoratorImport(