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