ViewRegistry type alias

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

type ViewRegistry<R extends PageReference | null | undefined> = {
    readonly [K in NonNullable<R>["kind"]]: PageComponent<ViewRegistryPage<R, K>>;
};

Compile-time check that every View kind has a component with a matching page prop. A nullable reference, such as a region slot's State["main"], checks its non-null kinds. A component whose page is a shared page reference ([RunicSharedClient]), such as ResultPagePageReference, registers for each of its kinds.