Skip to content

Commit

Permalink
Added type definition to option argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Dschungelabenteuer committed Mar 14, 2021
1 parent f478cac commit 193cf98
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions addons/docs/src/frameworks/vue/preset.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
export function webpackFinal(webpackConfig: any = {}, options: any = {}) {
interface Preset {
readonly name: string;
readonly options: any;
}

interface PresetOptions {
readonly presetsList: Preset[];
}

export function webpackFinal(
webpackConfig: any = {},
options: PresetOptions = { presetsList: [] }
) {
let vueDocgenOptions = {};

options.presetsList.forEach((preset: any) => {
options.presetsList.forEach((preset) => {
if (preset.name.includes('addon-docs') && preset.options.vueDocgenOptions) {
const appendableOptions = preset.options.vueDocgenOptions;
vueDocgenOptions = {
Expand Down

0 comments on commit 193cf98

Please sign in to comment.