Skip to main content

isPersonalProject()

function isPersonalProject(project:
| {
canAssignTasks: boolean;
childOrder: number;
color: string;
createdAt: Date | null;
defaultOrder: number;
description: string;
id: string;
inboxProject: boolean;
isArchived: boolean;
isCollapsed: boolean;
isDeleted: boolean;
isFavorite: boolean;
isFrozen: boolean;
isShared: boolean;
name: string;
parentId: string | null;
updatedAt: Date | null;
url: string;
viewStyle: string;
}
| {
access?: {
visibility: "restricted" | "team" | "public";
};
canAssignTasks: boolean;
childOrder: number;
collaboratorRoleDefault: string;
color: string;
createdAt: Date | null;
defaultOrder: number;
description: string;
folderId: string | null;
id: string;
isArchived: boolean;
isCollapsed: boolean;
isDeleted: boolean;
isFavorite: boolean;
isFrozen: boolean;
isInviteOnly: boolean | null;
isLinkSharingEnabled: boolean;
isShared: boolean;
name: string;
role: string | null;
status: string;
updatedAt: Date | null;
url: string;
viewStyle: string;
workspaceId: string;
}): project is { canAssignTasks: boolean; childOrder: number; color: string; createdAt: Date | null; defaultOrder: number; description: string; id: string; inboxProject: boolean; isArchived: boolean; isCollapsed: boolean; isDeleted: boolean; isFavorite: boolean; isFrozen: boolean; isShared: boolean; name: string; parentId: string | null; updatedAt: Date | null; url: string; viewStyle: string };

Type guard to check if a project is a personal project.

Parameters

ParameterTypeDescription
project| { canAssignTasks: boolean; childOrder: number; color: string; createdAt: Date | null; defaultOrder: number; description: string; id: string; inboxProject: boolean; isArchived: boolean; isCollapsed: boolean; isDeleted: boolean; isFavorite: boolean; isFrozen: boolean; isShared: boolean; name: string; parentId: string | null; updatedAt: Date | null; url: string; viewStyle: string; } | { access?: { visibility: "restricted" | "team" | "public"; }; canAssignTasks: boolean; childOrder: number; collaboratorRoleDefault: string; color: string; createdAt: Date | null; defaultOrder: number; description: string; folderId: string | null; id: string; isArchived: boolean; isCollapsed: boolean; isDeleted: boolean; isFavorite: boolean; isFrozen: boolean; isInviteOnly: boolean | null; isLinkSharingEnabled: boolean; isShared: boolean; name: string; role: string | null; status: string; updatedAt: Date | null; url: string; viewStyle: string; workspaceId: string; }The project to check

Returns

project is { canAssignTasks: boolean; childOrder: number; color: string; createdAt: Date | null; defaultOrder: number; description: string; id: string; inboxProject: boolean; isArchived: boolean; isCollapsed: boolean; isDeleted: boolean; isFavorite: boolean; isFrozen: boolean; isShared: boolean; name: string; parentId: string | null; updatedAt: Date | null; url: string; viewStyle: string }

True if the project is a personal project