File tree Expand file tree Collapse file tree 2 files changed +19
-18
lines changed Expand file tree Collapse file tree 2 files changed +19
-18
lines changed Original file line number Diff line number Diff line change @@ -131,20 +131,18 @@ export class MetadataCollector {
131
131
hasParameterData = true ;
132
132
}
133
133
}
134
- if ( methodDecorators || hasDecoratorData || hasParameterData ) {
135
- const data : MethodMetadata = { __symbolic : isConstructor ? "constructor" : "method" } ;
136
- const name = isConstructor ? "__ctor__" : evaluator . nameOf ( member . name ) ;
137
- if ( methodDecorators ) {
138
- data . decorators = methodDecorators ;
139
- }
140
- if ( hasDecoratorData ) {
141
- data . parameterDecorators = parameterDecoratorData ;
142
- }
143
- if ( hasParameterData ) {
144
- ( < ConstructorMetadata > data ) . parameters = parametersData ;
145
- }
146
- recordMember ( name , data ) ;
134
+ const data : MethodMetadata = { __symbolic : isConstructor ? "constructor" : "method" } ;
135
+ const name = isConstructor ? "__ctor__" : evaluator . nameOf ( member . name ) ;
136
+ if ( methodDecorators ) {
137
+ data . decorators = methodDecorators ;
138
+ }
139
+ if ( hasDecoratorData ) {
140
+ data . parameterDecorators = parameterDecoratorData ;
141
+ }
142
+ if ( hasParameterData ) {
143
+ ( < ConstructorMetadata > data ) . parameters = parametersData ;
147
144
}
145
+ recordMember ( name , data ) ;
148
146
break ;
149
147
case ts . SyntaxKind . PropertyDeclaration :
150
148
case ts . SyntaxKind . GetAccessor :
Original file line number Diff line number Diff line change @@ -146,7 +146,10 @@ describe('Collector', () => {
146
146
parameters :
147
147
[ { __symbolic : 'reference' , name : undefined , module : './hero.service' } ]
148
148
}
149
- ]
149
+ ] ,
150
+ onSelect : [ { __symbolic : 'method' } ] ,
151
+ ngOnInit : [ { __symbolic : 'method' } ] ,
152
+ getHeroes : [ { __symbolic : 'method' } ]
150
153
}
151
154
}
152
155
}
@@ -232,7 +235,7 @@ const FILES: Directory = {
232
235
import HeroService from './hero.service';
233
236
// thrown away
234
237
import 'angular2/core';
235
-
238
+
236
239
@MyComponent({
237
240
selector: 'my-app',
238
241
template:` + "`" + `
@@ -336,23 +339,23 @@ const FILES: Directory = {
336
339
export class CaseAny {
337
340
constructor(param: any) {}
338
341
}
339
-
342
+
340
343
@Injectable()
341
344
export class GetProp {
342
345
private _name: string;
343
346
@Input('firstName') get name(): string {
344
347
return this._name;
345
348
}
346
349
}
347
-
350
+
348
351
@Injectable()
349
352
export class SetProp {
350
353
private _name: string;
351
354
@Input('firstName') set name(value: string) {
352
355
this._name = value;
353
356
}
354
357
}
355
-
358
+
356
359
@Injectable()
357
360
export class FullProp {
358
361
private _name: string;
You can’t perform that action at this time.
0 commit comments