MatteoGabriele/vue-gtag

Why are you copying types from others packages and not importing them?

Closed this issue · 1 comments

If you are reporting a bug, please fill in below. Otherwise feel free to remove this template entirely.

Description

What are you reporting?

Sorry for my passive-aggressive title, but really... why are you copying types from other packages? It makes it impossible, as far as I know, to type my own function correctly as the types do not match as you're not exporting your own one...

image

I've added @types/gtag.js to my project and configured my tsconfig.js so it loads the types but now I got this:
image

Expected behavior

Tell us what you think should happen.
One of the following:

  1. Export your custom Gtag namespace
  2. Refactor so you can use the standard one from @types/gtag.js as expected

Actual behavior

Tell us what actually happens.

image

Environment

Run this command in the project folder and fill in their results:

npm ls vue-gtag: vue-gtag@2.0.1

Then, specify:

  1. Operating system: Windows 11 - developing inside WSL 2 Ubuntu 18.04
  2. Browser and version: Firefox Developer Edition 95.0b6

Reproducible Demo

Please take the time to create a new app that reproduces the issue or at least some code example

Demonstrable issues gets fixed faster.

Hardly to create an app while it's a typing error

First of all, take a deep breath.
I have no experience with typescript, and contributors have helped me with this.
I actually would love types definition to go outside the repository because I have no intention to maintain them. If you want to help me with this task, please go ahead.