4lejandrito / next-plausible

Simple integration for https://nextjs.org and https://plausible.io analytics
https://next-plausible.vercel.app
MIT License
603 stars 33 forks source link

Typescript error when having an Event without props and custom typed events #101

Closed cstrnt closed 1 year ago

cstrnt commented 1 year ago

We have a setup where we defined our custom events. Some of them don't have props and are like this

type Events = {
  // ... some events
  test: never;
}

When I know call plausible("test") I get the following error:

Argument of type '[]' is not assignable to parameter of type 'undefined'

4lejandrito commented 1 year ago

Published as next-plausible@3.10.2.

Thanks a lot @cstrnt!