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