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

Typescript build error TS2717 #66

Open
brianhilst opened this issue Jun 13, 2024 · 0 comments
Open

Typescript build error TS2717 #66

brianhilst opened this issue Jun 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@brianhilst
Copy link

Versions

  • 0.1

Describe the bug

The following compile error occurs when running or building my React app with plausible-tracker installed :

ERROR in node_modules/plausible-tracker/src/lib/tracker.ts:7:5
TS2717: Subsequent property declarations must have the same type. Property 'plausible' must be of type 'TrackEvent', but here has type 'TrackEvent'.

 5 |   interface Window {
 6 |     // eslint-disable-next-line functional/prefer-readonly-type
 7 |     plausible: TrackEvent;
   |     ^^^^^^^^^
 8 |   }

tsconfig.json "skipLibCheck": true does not work for this because it is in a .ts file rather than a .d.ts file. I have not been able to find any work-around.

Expected behavior

Able to build

Steps to reproduce

Steps:

  1. Add this package to a typescript based React app
  2. yarn run (or build)
  3. ...

Your Environment

  • React: ^18.2.0
  • Typescript: ^4.4.2
  • Device: Any browser
  • OS: MacOs
  • Browser: Doesn't matter
  • Version: N/A

Additional context

@brianhilst brianhilst added the bug Something isn't working label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant