Skip to content

Commit eaf6182

Browse files
elevatebarteddyerburgh
authored andcommitted
feat(types): add missing types to type definition (#199)
When using typescript on a vue site that has animation, it becomes quite vital to be able to check that they are called. In order to do just that in TS too. I add the missing types.
1 parent fce9da7 commit eaf6182

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

types/index.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,12 @@ interface MountOptions<V extends Vue> extends ComponentOptions<V> {
108108

109109
type ShallowOptions<V extends Vue> = MountOptions<V>
110110

111+
interface VueTestUtilsConfigOptions {
112+
stubs?: Stubs
113+
}
114+
111115
export declare function createLocalVue (): typeof Vue
116+
export declare let config: VueTestUtilsConfigOptions
112117

113118
export declare function mount<V extends Vue, Ctor extends VueClass<V> = VueClass<V>> (component: Ctor, options?: MountOptions<V>): Wrapper<V>
114119
export declare function mount<V extends Vue> (component: ComponentOptions<V>, options?: MountOptions<V>): Wrapper<V>
@@ -117,3 +122,6 @@ export declare function mount (component: FunctionalComponentOptions, options?:
117122
export declare function shallow<V extends Vue, Ctor extends VueClass<V> = VueClass<V>> (component: Ctor, options?: ShallowOptions<V>): Wrapper<V>
118123
export declare function shallow<V extends Vue> (component: ComponentOptions<V>, options?: ShallowOptions<V>): Wrapper<V>
119124
export declare function shallow (component: FunctionalComponentOptions, options?: ShallowOptions<Vue>): Wrapper<Vue>
125+
126+
export declare let TransitionStub: Component | string | true
127+
export declare let TransitionGroupStub: Component | string | true

0 commit comments

Comments
 (0)