Skip to content

Conversation

geclos
Copy link
Collaborator

@geclos geclos commented Oct 2, 2025

No description provided.

.limit(1)

return Result.ok(result[0])
return result[0] as Commit | undefined
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can clearly be undefined yet types always asserted commit existed, for some reason

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just don't do the as no? It will give drizzle schema or undefined

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for some reason it doesn't, not sure what is happening here

.orderBy(desc(commitsScope.mergedAt))
.limit(1)

return Result.ok(result[0])
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not return result objects in read methods

@geclos geclos force-pushed the fix/commit_repository_wrong_types branch 3 times, most recently from fa24012 to d59759a Compare October 2, 2025 09:36
@geclos geclos force-pushed the fix/commit_repository_wrong_types branch from d59759a to 0efab52 Compare October 2, 2025 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants