interface IGroupWithData<T = []> {
    id: string;
    name: TGroupGetName extends T ? string : never;
    organization: TGroupGetOrganization extends T ? string : never;
    projects: "projects"[] extends T
        ? Pick<IProjectWithData, "id" | "title">[]
        : never[];
    usermodels: "usermodels"[] extends T
        ? Pick<IUserModelWithData, "id" | "model">[]
        : never[];
    users: "users"[] extends T
        ? Pick<
            IUserWithData<("lastname" | "firstname" | "email" | "avatar")[]>,
            "id" | "lastname" | "firstname" | "email" | "avatar",
        >[]
        : never[];
    workspaces: "workspaces"[] extends T ? any[] : never[];
}

Type Parameters

  • T = []

Hierarchy (View Summary)

Properties

id: string
name: TGroupGetName extends T ? string : never
organization: TGroupGetOrganization extends T ? string : never
projects: "projects"[] extends T
    ? Pick<IProjectWithData, "id" | "title">[]
    : never[]
usermodels: "usermodels"[] extends T
    ? Pick<IUserModelWithData, "id" | "model">[]
    : never[]
users: "users"[] extends T
    ? Pick<
        IUserWithData<("lastname" | "firstname" | "email" | "avatar")[]>,
        "id" | "lastname" | "firstname" | "email" | "avatar",
    >[]
    : never[]
workspaces: "workspaces"[] extends T ? any[] : never[]