diff --git a/src/app/compiler/deps/helpers/class-helper.ts b/src/app/compiler/deps/helpers/class-helper.ts index f5ce3cba..f707bef3 100644 --- a/src/app/compiler/deps/helpers/class-helper.ts +++ b/src/app/compiler/deps/helpers/class-helper.ts @@ -675,6 +675,9 @@ export class ClassHelper { } } else if (node.elementType) { _return = kindToType(node.elementType.kind) + kindToType(node.kind); + if (node.elementType.typeName) { + _return = this.visitTypeName(node.elementType.typeName) + kindToType(node.kind); + } } else if (node.types && ts.isUnionTypeNode(node)) { _return = ''; let i = 0; diff --git a/test/src/cli/cli-generation-big-app.spec.ts b/test/src/cli/cli-generation-big-app.spec.ts index f0628136..a387d8e8 100644 --- a/test/src/cli/cli-generation-big-app.spec.ts +++ b/test/src/cli/cli-generation-big-app.spec.ts @@ -649,4 +649,9 @@ describe('CLI simple generation - big app', () => { expect(file).to.contain('LinearDomain: [Number, Number]'); expect(file).to.contain('LinearTodo: [Todo, Todo]'); }); + + it('should support Generic array types', () => { + let file = read(distFolder + '/components/AppComponent.html'); + expect(file).to.contain('Observable<Todo[]>'); + }); }); diff --git a/test/src/todomvc-ng2/src/app/app.component.ts b/test/src/todomvc-ng2/src/app/app.component.ts index a7b9656b..491bc1af 100644 --- a/test/src/todomvc-ng2/src/app/app.component.ts +++ b/test/src/todomvc-ng2/src/app/app.component.ts @@ -9,5 +9,7 @@ import { Component } from '@angular/core'; styleUrls: ['./app.component.css'] }) export class AppComponent { - + public getOrganizations(): Observable { + console.log('yo'); + } }