(
name: Name,
...rest: {} extends AnalyticsEvents[Name]
? [properties?: AnalyticsEvents[Name]]
: [properties: AnalyticsEvents[Name]]
)
| 191 | * this a no-op. Events with no properties may omit the second argument. |
| 192 | */ |
| 193 | export const trackEvent = <Name extends AnalyticsEventName>( |
| 194 | name: Name, |
| 195 | ...rest: {} extends AnalyticsEvents[Name] |
| 196 | ? [properties?: AnalyticsEvents[Name]] |
| 197 | : [properties: AnalyticsEvents[Name]] |
| 198 | ): void => { |
| 199 | currentAnalyticsClient?.(name, rest[0] ?? ({} as AnalyticsEvents[Name])); |
| 200 | }; |
| 201 | |
| 202 | /** |
| 203 | * Declarative mount for React hosts — sets the module-level client during |
no outgoing calls
no test coverage detected