type AssertComponentRoute<
Brand extends ComponentBrand,
Defs extends readonly AnyCustomId[],
TCtor extends AnyHandlerCtor
> =
SameSet<Brand, ComponentOf<TCtor>> extends true
? [DefsOf<TCtor>] extends [Defs]
? TCtor
: Mismatch<
"the customId definitions do not match the handler generic",
Defs,
DefsOf<TCtor>
>
: Mismatch<
"the decorator does not match the handler kind",
Brand,
ComponentOf<TCtor>
>;Brand
Brand extends ComponentBrandDefs
Defs extends readonly AnyCustomId[]TCtor
TCtor extends AnyHandlerCtor