We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d35443 commit 9833a58Copy full SHA for 9833a58
packages/0/src/composables/createPlugin/index.ts
@@ -19,6 +19,20 @@ export interface Plugin {
19
*
20
* @see https://vuejs.org/guide/reusability/plugins.html
21
* @see https://0.vuetifyjs.com/composables/foundation/create-plugin
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * export const [useContext, provideContext, context] = createContext<MyContext>('my-plugin')
26
27
+ * export const MyPlugin = createPlugin({
28
+ * namespace: 'my-plugin',
29
+ * provide: (app) => {
30
+ * provideContext(context, app)
31
+ * },
32
+ * setup: (app) => {
33
+ * // Optional setup logic
34
35
+ * })
36
*/
37
export function createPlugin<Z extends Plugin = Plugin> (options: PluginOptions) {
38
return {
0 commit comments