|
1 |
| -export interface PropOption { |
2 |
| - type?: { new (...args: any[]): any; } | { new (...args: any[]): any; }[]; |
3 |
| - required?: boolean; |
4 |
| - default?: any; |
5 |
| - twoWay?: boolean; |
6 |
| - validator?(value: any): boolean; |
7 |
| - coerce?(value: any): any; |
8 |
| -} |
| 1 | +import { ComponentOptions } from "vue"; |
9 | 2 |
|
10 |
| -export interface WatchOption { |
11 |
| - handler(val: any, oldVal: any): void; |
12 |
| - deep?: boolean; |
13 |
| - immidiate?: boolean; |
14 |
| -} |
15 |
| - |
16 |
| -export interface DirectiveOption { |
17 |
| - bind?(): any; |
18 |
| - update?(newVal?: any, oldVal?: any): any; |
19 |
| - unbind?(): any; |
20 |
| - params?: string[]; |
21 |
| - deep?: boolean; |
22 |
| - twoWay?: boolean; |
23 |
| - acceptStatement?: boolean; |
24 |
| - priority?: boolean; |
25 |
| - [key: string]: any; |
26 |
| -} |
27 |
| - |
28 |
| -export interface FilterOption { |
29 |
| - read?: Function; |
30 |
| - write?: Function; |
31 |
| -} |
32 |
| - |
33 |
| -export interface TransitionOption { |
34 |
| - css?: boolean; |
35 |
| - animation?: string; |
36 |
| - enterClass?: string; |
37 |
| - leaveClass?: string; |
38 |
| - beforeEnter?(el: HTMLElement): void; |
39 |
| - enter?(el: HTMLElement, done?: () => void): void; |
40 |
| - afterEnter?(el: HTMLElement): void; |
41 |
| - enterCancelled?(el: HTMLElement): void; |
42 |
| - beforeLeave?(el: HTMLElement): void; |
43 |
| - leave?(el: HTMLElement, done?: () => void): void; |
44 |
| - afterLeave?(el: HTMLElement): void; |
45 |
| - leaveCancelled?(el: HTMLElement): void; |
46 |
| - stagger?(index: number): number; |
47 |
| - enterStagger?(index: number): number; |
48 |
| - leaveStagger?(index: number): number; |
49 |
| - [key: string]: any; |
50 |
| -} |
51 |
| - |
52 |
| -export interface ComponentOption { |
53 |
| - data?(): {[key: string]: any}; |
54 |
| - props?: string[] | { [key: string]: (PropOption | { new (...args: any[]): any; }) }; |
55 |
| - watch?: { [key: string]: ((val: any, oldVal: any) => void) | string | WatchOption }; |
56 |
| - el?: string | HTMLElement | (() => HTMLElement); |
57 |
| - template?: string; |
58 |
| - replace?: boolean; |
59 |
| - directives?: { [key: string]: (DirectiveOption | Function) }; |
60 |
| - elementDirectives?: { [key: string]: (DirectiveOption | Function) }; |
61 |
| - filters?: { [key: string]: (Function | FilterOption) }; |
62 |
| - components?: { [key: string]: any }; |
63 |
| - transitions?: { [key: string]: TransitionOption }; |
64 |
| - partials?: { [key: string]: string }; |
65 |
| - parent?: any; |
66 |
| - events?: { [key: string]: ((...args: any[]) => (boolean | void)) | string }; |
67 |
| - mixins?: any[]; |
68 |
| - name?: string; |
69 |
| - [key: string]: any; |
70 |
| -} |
71 |
| - |
72 |
| -export default function(options: ComponentOption): ClassDecorator; |
| 3 | +export default function(options: ComponentOptions): ClassDecorator; |
0 commit comments