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 0ab1923Copy full SHA for 0ab1923
packages/0/src/composables/createPlugin/index.ts
@@ -19,6 +19,22 @@ 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] = createContext<MyContext>('my-plugin')
26
27
+ * const context = {}
28
29
+ * export const MyPlugin = createPlugin({
30
+ * namespace: 'my-plugin',
31
+ * provide: (app) => {
32
+ * provideContext(context, app)
33
+ * },
34
+ * setup: (app) => {
35
+ * // Optional setup logic
36
37
+ * })
38
*/
39
export function createPlugin<Z extends Plugin = Plugin> (options: PluginOptions) {
40
return {
0 commit comments