Something went wrong. Try again.
Monorepo for Tangled
Something went wrong. Try again.
TypeScript
123456789101112131415161718interface GrantEvidenceInput { granted?: boolean; url?: { searchParams: URLSearchParams } | null; // task creation requires an active grant tasks?: readonly unknown[] | null; sessionCreated?: boolean;}
export const hasGrantEvidence = ({ granted, url, tasks, sessionCreated}: GrantEvidenceInput = {}): boolean => sessionCreated === true || (tasks?.length ?? 0) > 0 || (granted === true && url != null && !url.searchParams.has("oauth_error"));