Skip to content

Commit

Permalink
fix(docs): parse methods
Browse files Browse the repository at this point in the history
  • Loading branch information
m0ksem committed Apr 19, 2023
1 parent 1bc9043 commit 7d74687
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/docs/modules/page-config/blocks/api/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,22 @@ const stringifyMeta = (meta: ComponentMeta) => {
types: slot.type
})
}), {}),
emits: meta.events.reduce((acc, event) => ({
events: meta.events.reduce((acc, event) => ({
...acc,
[event.name]: ({
types: event,
})
}), {}),
methods: {},
// TODO: We need to use exposed in components before
// methods: meta.exposed
// .filter((method) => /^\(.*\)\s?=>.*$/.test(method.type))
// .reduce((acc, method) => ({
// ...acc,
// [method.name]: ({
// types: method.type,
// }),
// }), {})
})
}

Expand Down

0 comments on commit 7d74687

Please sign in to comment.