File tree Expand file tree Collapse file tree
packages/common/decorators/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 * @publicApi
99 */
1010export function applyDecorators (
11- ...decorators : Array < ClassDecorator | MethodDecorator >
11+ ...decorators : Array < ClassDecorator | MethodDecorator | PropertyDecorator >
1212) {
1313 return < TFunction extends Function , Y > (
1414 target : TFunction | Object ,
1515 propertyKey ?: string | symbol ,
1616 descriptor ?: TypedPropertyDescriptor < Y > ,
1717 ) => {
18- for ( const decorator of decorators || [ ] ) {
19- target instanceof Function
20- ? ( decorator as ClassDecorator ) ( target )
21- : ( decorator as MethodDecorator ) ( target , propertyKey , descriptor ) ;
18+ for ( const decorator of decorators ) {
19+ if ( target instanceof Function ) {
20+ ( decorator as ClassDecorator ) ( target ) ;
21+ continue ;
22+ }
23+ ( decorator as MethodDecorator | PropertyDecorator ) (
24+ target ,
25+ propertyKey ,
26+ descriptor ,
27+ ) ;
2228 }
2329 } ;
2430}
You can’t perform that action at this time.
0 commit comments