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