# AssertComponentRoute

`type` in `core` · v0.8.0

<https://docs.seedcord.org/packages/core/0.8.0/types/assert-component-route>

## Declaration

```ts
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>
          ]
      >;
```
