refactor(ivy): rename and move ngcc Parsed... to Decorated... (#26082)

PR Close #26082
This commit is contained in:
Pete Bacon Darwin
2018-09-26 17:28:30 +01:00
committed by Miško Hevery
parent 7d0e17530b
commit d17602f31d
7 changed files with 45 additions and 45 deletions

View File

@ -10,8 +10,8 @@ import {Decorator} from '../../ngtsc/host';
import {DecoratorHandler} from '../../ngtsc/transform';
import {AnalyzedFile, Analyzer} from '../src/analyzer';
import {Fesm2015ReflectionHost} from '../src/host/fesm2015_host';
import {ParsedClass} from '../src/parsing/parsed_class';
import {ParsedFile} from '../src/parsing/parsed_file';
import {DecoratedClass} from '../src/host/decorated_class';
import {DecoratedFile} from '../src/host/decorated_file';
import {getDeclaration, makeProgram} from './helpers/utils';
const TEST_PROGRAM = {
@ -49,23 +49,25 @@ function createTestHandler() {
}
function createParsedFile(program: ts.Program) {
const file = new ParsedFile(program.getSourceFile('test.js') !);
const file = new DecoratedFile(program.getSourceFile('test.js') !);
const componentClass = getDeclaration(program, 'test.js', 'MyComponent', ts.isClassDeclaration);
file.decoratedClasses.push(new ParsedClass('MyComponent', {} as any, [{
name: 'Component',
import: {from: '@angular/core', name: 'Component'},
node: null as any,
args: null
}]));
file.decoratedClasses.push(
new DecoratedClass('MyComponent', {} as any, [{
name: 'Component',
import: {from: '@angular/core', name: 'Component'},
node: null as any,
args: null
}]));
const serviceClass = getDeclaration(program, 'test.js', 'MyService', ts.isClassDeclaration);
file.decoratedClasses.push(new ParsedClass('MyService', {} as any, [{
name: 'Injectable',
import: {from: '@angular/core', name: 'Injectable'},
node: null as any,
args: null
}]));
file.decoratedClasses.push(
new DecoratedClass('MyService', {} as any, [{
name: 'Injectable',
import: {from: '@angular/core', name: 'Injectable'},
node: null as any,
args: null
}]));
return file;
}