File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
projects/ngx-sub-form/src/lib Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,17 @@ export class DataInputUsedOnWrongPropertyError extends Error {
9
9
}
10
10
11
11
export function DataInput ( ) {
12
- return function ( target : NgxRootFormComponent < any , any > , propertyKey : string ) {
12
+ return function < ControlInterface , FormInterface = ControlInterface > (
13
+ target : NgxRootFormComponent < ControlInterface , FormInterface > ,
14
+ propertyKey : string ,
15
+ ) {
13
16
if ( propertyKey !== 'dataInput' ) {
14
17
throw new DataInputUsedOnWrongPropertyError ( propertyKey ) ;
15
18
}
16
19
17
20
Object . defineProperty ( target , propertyKey , {
18
21
set : function ( dataInputValue ) {
19
- ( this as NgxRootFormComponent < any , any > ) . dataInputUpdated ( dataInputValue ) ;
22
+ ( this as NgxRootFormComponent < ControlInterface , FormInterface > ) . dataInputUpdated ( dataInputValue ) ;
20
23
} ,
21
24
} ) ;
22
25
} ;
You can’t perform that action at this time.
0 commit comments