Skip to content

Commit 9833a58

Browse files
committed
chore(createPlugin): add @example to docblock
1 parent 8d35443 commit 9833a58

File tree

1 file changed

+14
-0
lines changed
  • packages/0/src/composables/createPlugin

1 file changed

+14
-0
lines changed

packages/0/src/composables/createPlugin/index.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,20 @@ export interface Plugin {
1919
*
2020
* @see https://vuejs.org/guide/reusability/plugins.html
2121
* @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+
* })
2236
*/
2337
export function createPlugin<Z extends Plugin = Plugin> (options: PluginOptions) {
2438
return {

0 commit comments

Comments
 (0)