@@ -77,7 +77,12 @@ export type CompatVue = Pick<App, 'version' | 'component' | 'directive'> & {
7777
7878 nextTick : typeof nextTick
7979
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+
8186 mixin ( mixin : ComponentOptions ) : CompatVue
8287
8388 component ( name : string ) : Component | undefined
@@ -176,11 +181,11 @@ export function createCompatVue(
176181 Vue . version = `2.6.14-compat:${ __VERSION__ } `
177182 Vue . config = singletonApp . config
178183
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 )
184189 }
185190 return Vue
186191 }
0 commit comments