InferCapability<T>: keyof T["nb"] extends never
    ? {
        can: T["can"];
        with: T["with"];
    }
    : {
        can: T["can"];
        nb: T["nb"];
        with: T["with"];
    }

When normalize capabilities by removing nb if it is a {}. This type does that normalization at the type level.

Type Parameters

Generated using TypeDoc