1
1
export interface PropOption {
2
- type ?: { ( ...args : any [ ] ) : any ; } ;
2
+ type ?: { new ( ...args : any [ ] ) : any ; } ;
3
3
required ?: boolean ;
4
4
default ?: any ;
5
5
twoWay ?: boolean ;
6
- validator ?: ( value : any ) => boolean ;
7
- coerce ?: ( value : any ) => any ;
6
+ validator ?( value : any ) : boolean ;
7
+ coerce ?( value : any ) : any ;
8
8
}
9
9
10
10
export interface WatchOption {
@@ -32,6 +32,9 @@ export interface FilterOption {
32
32
33
33
export interface TransitionOption {
34
34
css ?: boolean ;
35
+ animation ?: string ;
36
+ enterClass ?: string ;
37
+ leaveClass ?: string ;
35
38
beforeEnter ?( el : HTMLElement ) : void ;
36
39
enter ?( el : HTMLElement , done ?: ( ) => void ) : void ;
37
40
afterEnter ?( el : HTMLElement ) : void ;
@@ -41,12 +44,18 @@ export interface TransitionOption {
41
44
afterLeave ?( el : HTMLElement ) : void ;
42
45
leaveCancelled ?( el : HTMLElement ) : void ;
43
46
stagger ?( index : number ) : number ;
47
+ enterStagger ?( index : number ) : number ;
48
+ leaveStagger ?( index : number ) : number ;
49
+ [ key : string ] : any ;
44
50
}
45
51
46
52
export interface ComponentOption {
53
+ data ?( ) : { [ key : string ] : any } ;
47
54
props ?: string [ ] | { [ key : string ] : ( PropOption | { new ( ...args : any [ ] ) : any ; } ) } ;
48
55
watch ?: { [ key : string ] : ( ( val : any , oldVal : any ) => void ) | string | WatchOption } ;
56
+ el ?: string | HTMLElement | ( ( ) => HTMLElement ) ;
49
57
template ?: string ;
58
+ replace ?: boolean ;
50
59
directives ?: { [ key : string ] : ( DirectiveOption | Function ) } ;
51
60
elementDirectives ?: { [ key : string ] : ( DirectiveOption | Function ) } ;
52
61
filters ?: { [ key : string ] : ( Function | FilterOption ) } ;
@@ -55,11 +64,9 @@ export interface ComponentOption {
55
64
partials ?: { [ key : string ] : string } ;
56
65
parent ?: any ;
57
66
events ?: { [ key : string ] : ( ( ...args : any [ ] ) => ( boolean | void ) ) | string } ;
58
- mixins ?: ComponentOption [ ] ;
67
+ mixins ?: any [ ] ;
59
68
name ?: string ;
60
69
[ key : string ] : any ;
61
70
}
62
71
63
- declare var decorator : ( options : ComponentOption ) => ClassDecorator ;
64
-
65
- export default decorator ;
72
+ export default function ( options : ComponentOption ) : ClassDecorator ;
0 commit comments