Error when using pageTrackerSkipSamePath option - types don't match
mrchimp opened this issue · comments
Jake commented
Environment *
Run this command in the project folder and fill in their results:
npm ls vue-gtag
:
package.json@0.0.0 /home/mrchimp/code/project
└── vue-gtag@2.0.1
npm ls vue
:
package.json@0.0.0 /home/mrchimp/code/project
├─┬ vue@3.2.47
└─┬ vuex@4.1.0
└── vue@3.2.47 deduped
Then, specify:
- Operating system: Ubuntu 22.04.2
- Browser and version: n/a
Description *
I am seeing a type error when trying to use the pageTrackerSkipSamePath
option in TypeScript, like so:
app.use(
VueGtag,
{
pageTrackerSkipSamePath: false, // This is line 34
config: { id: import.meta.env.VITE_GA },
},
router
);
Expected behavior
Compile without error.
Actual behavior
I get an error:
src/main.ts:34:5 - error TS2345: Argument of type '{ pageTrackerSkipSamePath: boolean; config: { id: any; }; }' is not assignable to parameter of type 'PluginOptions'.
Object literal may only specify known properties, and 'pageTrackerSkipSamePath' does not exist in type 'PluginOptions'.
34 pageTrackerSkipSamePath: false,
Further Info
It seems that the options don't match up with the type definition.
Jimmie Jackson commented
The same thing is happening when I'm trying to use pageTrackerExcludedRoutes
, and doesn't appear to be actually excluding routes either.