@ -11,11 +11,11 @@
|
||||
"dependencies": {
|
||||
"reflect-metadata": "^0.1.2",
|
||||
"minimist": "^1.2.0",
|
||||
"tsickle": "^0.29.0",
|
||||
"tsickle": "^0.30.0",
|
||||
"chokidar": "^1.4.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": ">=2.7.2 <2.9",
|
||||
"typescript": ">=2.7.2 <2.10",
|
||||
"@angular/compiler": "0.0.0-PLACEHOLDER"
|
||||
},
|
||||
"engines" : {
|
||||
|
@ -109,7 +109,7 @@ const MIN_TS_VERSION = '2.7.2';
|
||||
* ∀ supported typescript version v, v < MAX_TS_VERSION
|
||||
* MAX_TS_VERSION is not considered as a supported TypeScript version
|
||||
*/
|
||||
const MAX_TS_VERSION = '2.9.0';
|
||||
const MAX_TS_VERSION = '2.10.0';
|
||||
|
||||
class AngularCompilerProgram implements Program {
|
||||
private rootNames: string[];
|
||||
|
@ -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', () => {
|
||||
|
Reference in New Issue
Block a user