Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

feat: added typings for vue-analytics #258

Merged
merged 2 commits into from
Dec 10, 2019

Conversation

justindra
Copy link
Contributor

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Added Typings for Vue Analytics, closes #161

What is the current behavior? (You can also link to an open issue here)
There is no TS support #161

What is the new behavior (if this is a feature change)?
TS Support added

Does this PR introduce a breaking change?
Nope

Please check if the PR fulfills these requirements

  • The commit message follows semantic-release guidelines
  • Fix/Feature: Docs have been added/updated
  • Fix/Feature: Tests have been added; existing tests pass

Other information:
N/A

@MatteoGabriele
Copy link
Owner

@justindra thanks a lot fo the PR! I will have a look later today

@MatteoGabriele MatteoGabriele merged commit b05fb0d into MatteoGabriele:master Dec 10, 2019
@MatteoGabriele
Copy link
Owner

🎉 This PR is included in version 5.19.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

(category: string, action?: string, label?: string, value?: number): void;
(options: {
eventCategory: string,
eventAction: string,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 10-12, these should also be marked as optional, i.e.:

eventAction?: string,
eventLabel?: string,
eventValue?: number

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@justindra justindra mentioned this pull request Dec 11, 2019
3 tasks
@romansp
Copy link
Contributor

romansp commented Dec 13, 2019

Thanks for the typescript support! Any chance options argument of install method can be extracted into its own interface for proper type-checking in Vue.install call?

import VueAnalitycs, { InstallOptions } from "vue-analytics";

// type-checking here
const options: InstallOptions = { 
  id: "xxx",
  router,
};

Vue.use(VueAnalytics, options);

@MatteoGabriele
Copy link
Owner

MatteoGabriele commented Dec 13, 2019

@romansp to be honest, I'm glad that a PR for it has been open because I'm not really a typescript guy so I don't know too much.
if you want to support it, be my guest and open a PR too.

Open source is nice especially for this :)

@romansp romansp mentioned this pull request Dec 15, 2019
3 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeScript support
4 participants