@@ -77,7 +77,12 @@ export type CompatVue = Pick<App, 'version' | 'component' | 'directive'> & {
77
77
78
78
nextTick : typeof nextTick
79
79
80
- use ( plugin : Plugin , ...options : any [ ] ) : CompatVue
80
+ use < Options extends unknown [ ] > (
81
+ plugin : Plugin < Options > ,
82
+ ...options : Options
83
+ ) : CompatVue
84
+ use < Options > ( plugin : Plugin < Options > , options : Options ) : CompatVue
85
+
81
86
mixin ( mixin : ComponentOptions ) : CompatVue
82
87
83
88
component ( name : string ) : Component | undefined
@@ -176,11 +181,11 @@ export function createCompatVue(
176
181
Vue . version = `2.6.14-compat:${ __VERSION__ } `
177
182
Vue . config = singletonApp . config
178
183
179
- Vue . use = ( p , ...options ) => {
180
- if ( p && isFunction ( p . install ) ) {
181
- p . install ( Vue as any , ...options )
182
- } else if ( isFunction ( p ) ) {
183
- p ( Vue as any , ...options )
184
+ Vue . use = ( plugin : Plugin , ...options : any [ ] ) => {
185
+ if ( plugin && isFunction ( plugin . install ) ) {
186
+ plugin . install ( Vue as any , ...options )
187
+ } else if ( isFunction ( plugin ) ) {
188
+ plugin ( Vue as any , ...options )
184
189
}
185
190
return Vue
186
191
}
0 commit comments