Function
mergeProps
(
props: FormKitPseudoProps,
newProps: FormKitPseudoProps
)
Source from the content-addressed store, hash-verified
| 2386 | } |
| 2387 | |
| 2388 | function mergeProps( |
| 2389 | props: FormKitPseudoProps, |
| 2390 | newProps: FormKitPseudoProps |
| 2391 | ): FormKitPseudoProps { |
| 2392 | if (Array.isArray(props) && Array.isArray(newProps)) |
| 2393 | return props.concat(newProps) |
| 2394 | return merge(toPropsObj(props), toPropsObj(newProps)) as Record< |
| 2395 | PropertyKey, |
| 2396 | FormKitPseudoProp |
| 2397 | > |
| 2398 | } |
| 2399 | |
| 2400 | /** |
| 2401 | * Adds a child to the node. |