(
name: Name,
...rest: {} extends AnalyticsEvents[Name]
? [properties?: AnalyticsEvents[Name]]
: [properties: AnalyticsEvents[Name]]
)
| 208 | * this a no-op. Events with no properties may omit the second argument. |
| 209 | */ |
| 210 | export const trackEvent = <Name extends AnalyticsEventName>( |
| 211 | name: Name, |
| 212 | ...rest: {} extends AnalyticsEvents[Name] |
| 213 | ? [properties?: AnalyticsEvents[Name]] |
| 214 | : [properties: AnalyticsEvents[Name]] |
| 215 | ): void => { |
| 216 | currentAnalyticsClient?.(name, rest[0] ?? ({} as AnalyticsEvents[Name])); |
| 217 | }; |
| 218 | |
| 219 | /** |
| 220 | * Declarative mount for React hosts — sets the module-level client during |
no outgoing calls
no test coverage detected