Skip to content

Home > vue-metamorph > PluginOptions

PluginOptions interface

The parsed CLI options that vue-metamorph passes to each plugin.

Options registered through additionalCliOptions aren't known ahead of time, so every key reads as unknown. That's enough to check whether an option is set:

ts
if (opts.myCustomOption) { ... }

To give an option a declared type, augment this interface once. Match the declaration to the option's Commander registration. Augmentation doesn't validate or convert values.

ts
import 'vue-metamorph';

declare module 'vue-metamorph' {
  interface PluginOptions {
    myCustomOption?: boolean;
  }
}

Signature:

typescript
export interface PluginOptions