(
name: Name,
...rest: {} extends AnalyticsEvents[Name]
? [properties?: AnalyticsEvents[Name]]
: [properties: AnalyticsEvents[Name]]
)
| 229 | * this a no-op. Events with no properties may omit the second argument. |
| 230 | */ |
| 231 | export const trackEvent = <Name extends AnalyticsEventName>( |
| 232 | name: Name, |
| 233 | ...rest: {} extends AnalyticsEvents[Name] |
| 234 | ? [properties?: AnalyticsEvents[Name]] |
| 235 | : [properties: AnalyticsEvents[Name]] |
| 236 | ): void => { |
| 237 | currentAnalyticsClient?.(name, rest[0] ?? ({} as AnalyticsEvents[Name])); |
| 238 | }; |
| 239 | |
| 240 | /** |
| 241 | * Declarative mount for React hosts — sets the module-level client during |
no outgoing calls
no test coverage detected