( props: ComponentPropsOptions | EmitsOptions, )
| 432 | * @internal |
| 433 | */ |
| 434 | export function normalizePropsOrEmits( |
| 435 | props: ComponentPropsOptions | EmitsOptions, |
| 436 | ): ComponentObjectPropsOptions | ObjectEmitsOptions { |
| 437 | return isArray(props) |
| 438 | ? props.reduce( |
| 439 | (normalized, p) => ((normalized[p] = null), normalized), |
| 440 | {} as ComponentObjectPropsOptions | ObjectEmitsOptions, |
| 441 | ) |
| 442 | : props |
| 443 | } |
| 444 | |
| 445 | /** |
| 446 | * Runtime helper for merging default declarations. Imported by compiled code |
no outgoing calls
no test coverage detected