registryEntries function

Module @runic-artifex/views in @runic-artifex/views 0.23.0

function registryEntries<const K extends string, C>(kinds: readonly K[], component: C): {
    readonly [P in K]: C;
};

One entry per kind with the same component, to spread into a ViewRegistry, such as { ...registryEntries(resultPageKinds, ResultPageView), settings: SettingsView } satisfies ViewRegistry<State["main"]> for a generated shared client's kinds.