Skip to content

Commit

Permalink
Make props attribute in EventOptions optional
Browse files Browse the repository at this point in the history
Getting some type errors if we define `revenue` but not `props`
  • Loading branch information
steven-tey authored Aug 5, 2024
1 parent d79a558 commit b175b91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/usePlausible.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useCallback } from 'react'
// https://docs.plausible.io/custom-event-goals#using-custom-props
type Props = Record<string, unknown> | never
type EventOptions<P extends Props> = {
props: P
props?: P
// https://plausible.io/docs/ecommerce-revenue-tracking
revenue?: {
currency: string
Expand Down

0 comments on commit b175b91

Please sign in to comment.