Skip to content

Commit

Permalink
fix(deps): indexable for class
Browse files Browse the repository at this point in the history
fix #255
  • Loading branch information
vogloblinsky committed Aug 2, 2017
1 parent 91f23f3 commit a12c120
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
5 changes: 4 additions & 1 deletion dist/index-cli.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion dist/index.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/app/compiler/dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,9 @@ export class Dependencies {
if(IO.methods) {
deps.methods = IO.methods;
}
if(IO.indexSignatures) {
deps.indexSignatures = IO.indexSignatures;
}
if (IO.extends) {
deps.extends = IO.extends;
}
Expand Down
5 changes: 5 additions & 0 deletions test/src/cli/cli-generation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,11 @@ describe('CLI simple generation', () => {
file = read('documentation/interfaces/ClockInterface.html');
expect(file).to.contain('id="readme-tab"');
});

it('should support indexable for class', () => {
let file = read('documentation/classes/Todo.html');
expect(file).to.contain('<code>[index: number]');
});
});

describe('when generation with -t flag', () => {
Expand Down
2 changes: 2 additions & 0 deletions test/src/todomvc-ng2/src/app/shared/models/todo.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export class Todo extends Tada {
*/
editing: boolean;

[index: number]: string;

testCommentFunction(dig: number, str: string, bool: boolean): object {
return {};
}
Expand Down

0 comments on commit a12c120

Please sign in to comment.