ComponentArgs
tipo
Correlated name and props pairs for dynamic APIs. Use a rest parameter of this type when the name may be a union; a plain generic pair can infer the union and accept unrelated props.
ts
import type { ComponentArgs } from "@meekojs/meeko";Código fuente src/app/definitions/component-registry.ts:64
Declaración #
ts
type ComponentArgs = {
[Name in ComponentName]: [name: Name, props: ComponentProps<Name>]
}[ComponentName]Ejemplo #
ts
function openModal(...[name, props]: ComponentArgs): void {
// Render the component named by `name` with `props`.
}