File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
packages/0/src/factories/createPlugin Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,13 @@ import type { App } from 'vue'
4
4
export interface PluginOptions {
5
5
namespace : string
6
6
provide : ( app : App ) => void
7
- setup ?: ( app : App ) => void | Promise < void >
7
+ setup ?: ( app : App ) => void
8
8
}
9
9
10
10
/**
11
- * A universal plugin factory to reduce boilerplate code for Vue plugin creation.
12
- * @param options Configurable object with namespace and provide/setup methods.
13
- * @returns A Vue plugin object with install method that runs app w/ context.
11
+ * A universal plugin factory to reduce boilerplate code for Vue plugin creation
12
+ * @param options Configurable object with namespace and provide/setup methods
13
+ * @returns A Vue plugin object with install method that runs app w/ context
14
14
*
15
15
* @see https://vuejs.org/api/application.html#app-runwithcontext
16
16
* @see https://0.vuetifyjs.com/factories/create-plugin
@@ -20,8 +20,7 @@ export function createPlugin<Z> (options: PluginOptions) {
20
20
install ( app : App ) {
21
21
app . runWithContext ( ( ) => {
22
22
options . provide ( app )
23
-
24
- if ( options . setup ) options . setup ( app )
23
+ options . setup ?.( app )
25
24
} )
26
25
} ,
27
26
} as Z
You can’t perform that action at this time.
0 commit comments