Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing TypeScript support #11

Open
Clex1o1 opened this issue Apr 6, 2022 · 1 comment
Open

Missing TypeScript support #11

Clex1o1 opened this issue Apr 6, 2022 · 1 comment

Comments

@Clex1o1
Copy link

Clex1o1 commented Apr 6, 2022

The package does not provide types. I tested it in my Vue3 project. Also npm i --save-dev @types/vue-feature-toggle did not help. Can you provide types?

@theRenard
Copy link

theRenard commented Jun 6, 2022

you can use this as a quick fix

// vue-feature-toggle.d.ts

declare module 'vue-feature-toggle' {
  export const FeatureToggleComponent: {

      name: string;
      on(eventtype: string, fn: Function, config: any | undefined): void;
      trigger: Function;
      showLogs: (showLogs: boolean) => void;
      isVisible: boolean;
      visibility(param1: any, param2: any, param3: any, param4: any): void;
      requiredVisibility(fn: Function): void;
      defaultVisibility(fn: Function): void;
      addPlugin(plugin: any): void;
      setData(nameParam: string | undefined, variantOrDataParam: any, dataParam: any): void;
  };
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants