feat: typescript 2.9 support (#24652)

PR Close #24652
This commit is contained in:
Igor Minar
2018-06-25 11:11:22 +02:00
committed by Miško Hevery
parent 0c3738a780
commit e3064d5432
38 changed files with 293 additions and 204 deletions

View File

@ -974,7 +974,7 @@ describe('Collector', () => {
});
});
describe('regerssion', () => {
describe('regression', () => {
it('should be able to collect a short-hand property value', () => {
const metadata = collectSource(`
const children = { f1: 1 };
@ -1040,37 +1040,6 @@ describe('Collector', () => {
.not.toBeUndefined('typeGuard was not collected');
});
it('should be able to collect an invalid access expression', () => {
const source = createSource(`
import {Component} from '@angular/core';
const value = [];
@Component({
provider: [{provide: 'some token', useValue: value[]}]
})
export class MyComponent {}
`);
const metadata = collector.getMetadata(source) !;
expect(metadata.metadata.MyComponent).toEqual({
__symbolic: 'class',
decorators: [{
__symbolic: 'call',
expression: {
__symbolic: 'reference',
module: '@angular/core',
name: 'Component',
line: 4,
character: 9
},
arguments: [{
__symbolic: 'error',
message: 'Expression form not supported',
line: 5,
character: 55
}]
}]
});
});
});
describe('references', () => {