@@ -399,15 +399,8 @@ export interface Directive {
399
399
* @stable
400
400
* @Annotation
401
401
*/
402
- export const Directive : DirectiveDecorator = < DirectiveDecorator > makeDecorator ( 'Directive' , {
403
- selector : undefined ,
404
- inputs : undefined ,
405
- outputs : undefined ,
406
- host : undefined ,
407
- providers : undefined ,
408
- exportAs : undefined ,
409
- queries : undefined
410
- } ) ;
402
+ export const Directive : DirectiveDecorator =
403
+ < DirectiveDecorator > makeDecorator ( 'Directive' , ( dir : Directive = { } ) => dir ) ;
411
404
412
405
/**
413
406
* Type of the Component decorator / constructor function.
@@ -691,26 +684,7 @@ export interface Component extends Directive {
691
684
* @Annotation
692
685
*/
693
686
export const Component : ComponentDecorator = < ComponentDecorator > makeDecorator (
694
- 'Component' , {
695
- selector : undefined ,
696
- inputs : undefined ,
697
- outputs : undefined ,
698
- host : undefined ,
699
- exportAs : undefined ,
700
- moduleId : undefined ,
701
- providers : undefined ,
702
- viewProviders : undefined ,
703
- changeDetection : ChangeDetectionStrategy . Default ,
704
- queries : undefined ,
705
- templateUrl : undefined ,
706
- template : undefined ,
707
- styleUrls : undefined ,
708
- styles : undefined ,
709
- animations : undefined ,
710
- encapsulation : undefined ,
711
- interpolation : undefined ,
712
- entryComponents : undefined
713
- } ,
687
+ 'Component' , ( c : Component = { } ) => ( { changeDetection : ChangeDetectionStrategy . Default , ...c } ) ,
714
688
Directive ) ;
715
689
716
690
/**
@@ -750,10 +724,8 @@ export interface Pipe {
750
724
* @stable
751
725
* @Annotation
752
726
*/
753
- export const Pipe : PipeDecorator = < PipeDecorator > makeDecorator ( 'Pipe' , {
754
- name : undefined ,
755
- pure : true ,
756
- } ) ;
727
+ export const Pipe : PipeDecorator =
728
+ < PipeDecorator > makeDecorator ( 'Pipe' , ( p : Pipe ) => ( { pure : true , ...p } ) ) ;
757
729
758
730
759
731
/**
@@ -825,7 +797,7 @@ export interface Input {
825
797
* @Annotation
826
798
*/
827
799
export const Input : InputDecorator =
828
- makePropDecorator ( 'Input' , [ [ ' bindingPropertyName' , undefined ] ] ) ;
800
+ makePropDecorator ( 'Input' , ( bindingPropertyName ?: string ) => ( { bindingPropertyName } ) ) ;
829
801
830
802
/**
831
803
* Type of the Output decorator / constructor function.
@@ -891,7 +863,7 @@ export interface Output { bindingPropertyName?: string; }
891
863
* @Annotation
892
864
*/
893
865
export const Output : OutputDecorator =
894
- makePropDecorator ( 'Output' , [ [ ' bindingPropertyName' , undefined ] ] ) ;
866
+ makePropDecorator ( 'Output' , ( bindingPropertyName ?: string ) => ( { bindingPropertyName } ) ) ;
895
867
896
868
897
869
/**
@@ -951,7 +923,7 @@ export interface HostBinding { hostPropertyName?: string; }
951
923
* @Annotation
952
924
*/
953
925
export const HostBinding : HostBindingDecorator =
954
- makePropDecorator ( 'HostBinding' , [ [ ' hostPropertyName' , undefined ] ] ) ;
926
+ makePropDecorator ( 'HostBinding' , ( hostPropertyName ?: string ) => ( { hostPropertyName } ) ) ;
955
927
956
928
957
929
/**
@@ -1013,4 +985,4 @@ export interface HostListener {
1013
985
* @Annotation
1014
986
*/
1015
987
export const HostListener : HostListenerDecorator =
1016
- makePropDecorator ( 'HostListener' , [ [ ' eventName' , undefined ] , [ ' args' , [ ] ] ] ) ;
988
+ makePropDecorator ( 'HostListener' , ( eventName ?: string , args ?: string [ ] ) => ( { eventName , args } ) ) ;
0 commit comments