mergeEventConfig
mergeEventConfig<
T>(base,custom,options?):T
Merge custom event configuration into base configuration.
- Skips undefined, empty strings, and empty arrays
- Deep merges metadata (original + custom)
Type Parameters
Section titled “Type Parameters”T extends Record<string, unknown>
Parameters
Section titled “Parameters”T
Base event configuration
custom
Section titled “custom”Partial<T> | undefined
Custom configuration to merge (can be undefined)
options?
Section titled “options?”Merge options
Returns
Section titled “Returns”T
Merged configuration
Example
Section titled “Example”const base = { id: "event-1", title: "Event", metadata: { a: 1, b: 2 } };const custom = { title: "Custom Event", metadata: { b: 3, c: 4 } };const result = mergeEventConfig(base, custom);// Result: { id: "event-1", title: "Custom Event", metadata: { a: 1, b: 3, c: 4 } }