# AssertContextMenuRoute

`type` in `core` · v0.8.0

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

## Declaration

```ts
type AssertContextMenuRoute<
    Kind extends ContextMenuKind,
    Names extends NamesFor<Kind>,
    TCtor extends AnyHandlerCtor
> = [Kind] extends [ContextMenuKindOf<TCtor>]
    ? [ContextMenuKindOf<TCtor>] extends [Kind]
        ? [Names] extends [ContextMenuNamesOf<TCtor>]
            ? [ContextMenuNamesOf<TCtor>] extends [Names]
                ? TCtor
                : Constructor<
                      [
                          "ContextMenuHandler declares a name that the ContextMenuRoute decorator does not list",
                          ContextMenuNamesOf<TCtor>
                      ]
                  >
            : Constructor<
                  [
                      "ContextMenuRoute lists a name that the ContextMenuHandler generic does not declare",
                      Names
                  ]
              >
        : Constructor<
              [
                  "ContextMenuHandler declares a kind that the ContextMenuRoute decorator does not match",
                  ContextMenuKindOf<TCtor>
              ]
          >
    : Constructor<
          [
              "ContextMenuRoute does not match the ContextMenuHandler generic",
              Kind
          ]
      >;
```
